Posts: 47
Threads: 26
Joined: Oct 2011
Reputation:
0
if(mysql_fetch_row(lajn)) sscanf(lajn, "p<|>is[24]s[24]s[64]s[32]s[16]", ajdi, banovani, admin, rizon, dejt);
mysql_free_result();
whats wrong ?
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
"is[24]s[24]s[64]s[32]s[16]" -> 6 specifiers.
ajdi, banovani, admin, rizon, dejt -> 5 parameters.
You forgot 1 parameter.
Posts: 810
Threads: 17
Joined: Aug 2013
Reputation:
0
Nvm look above i was too late.
Posts: 47
Threads: 26
Joined: Oct 2011
Reputation:
0
I fix this .. but i have other problem
sscanf warning: String buffer overflow. wtf ?
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
The name on the parameters don't help us that much to understand what is about.
According to the picture above, it'd be: "p<|>s[24]s[24]s[64]s[32]i" and the parameters: name, admin, reason, date, id.
EDIT: That means that the lenght of the string is greater than the one which specified. For example, you say "s[24]" and that can get up to 23 characters. Any data with a greater lenght such as 40 (an example) will cause sscanf warning: String buffer overflow.