ivakyb / minini

Automatically exported from code.google.com/p/minini
Other
0 stars 0 forks source link

update of key value fails with space before = #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is an easy defect to replicate.  It manifests when updating a value
that is written as:
key = VALUE
and works fine with:
key=VALUE

The problem is in the string length comparison. When the space is added
before the '=' sign, it is not stripped and renders a faulty equality test
around line 457:
match = ((ep != NULL) && ((int)(ep-sp) == len) && (_tcsnicmp(sp,Key,len) ==
0));

'ep-sp' ends up being one more than 'len' when there is a space before the
equals.

Simple workaround (avoid spaces), but it would be nice to have it fixed.

Original issue reported on code.google.com by andy.hew...@gmail.com on 23 Oct 2009 at 3:41

GoogleCodeExporter commented 9 years ago
Corrected in version 0.8. Thank you for the report.

Original comment by thiadmer...@gmail.com on 28 Oct 2009 at 8:32