http://bugs.winehq.com/show_bug.cgi?id=1589
Summary: sscanf assigns incorrect value to %n variable Product: Wine Version: 20030709 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: critical Priority: P2 Component: wine-misc AssignedTo: wine-bugs@winehq.com ReportedBy: tim.ruehsen@openmediasystem.de
int pos=0; char s1[32], s2[32];
sscanf("136 I30 I40 hello","%*u %s %s %n",s1,s2,&pos); // now pos=2! but it should be 12!
this comes out when linking the app dynamically on Windows (XP) and running with wine on Linux (SuSE 8.1). After linking statically it works correctly (pos=12).
This may break any dynamically linked application that relies on %n.