Menu

#6 bugfix for ini_readInt

open-fixed
None
5
2008-04-04
2006-07-30
No

Patch applies to 1.1.10-2

This small patch fixes a bug in ini_readInt.

Assinging the return value of "sscanf" to "res" was
missing. This caused ini_readInt to return -1 even if
the int was read ok. The patch fixes this bug.

Christopher Lang

--- types.i-original 2006-07-29 19:20:59.000000000 +0200
+++ libini-1.1.10/src/types.i 2006-07-29
19:21:24.000000000 +0200
@@ -215,7 +215,7 @@
{
char *data = __ini_readList (ini);
if (data)
- sscanf (data, "%d", value);
+ ret = sscanf (data, "%d", value);
}
else
#endif // INI_ADD_LIST_SUPPORT

Discussion

  • Christopher Lang

    Bugfix for ini_readInt

     
  • Simon White

    Simon White - 2008-04-04

    Logged In: YES
    user_id=59929
    Originator: NO

    Thankyou, fix is present in CVS.

     
  • Simon White

    Simon White - 2008-04-04
    • assigned_to: nobody --> s_a_white
    • status: open --> open-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB