for ( ; *astr; ) { if ( LOWER(*astr) != LOWER(*bstr) ) { return FALSE; } *astr++; *bstr++; }
return TRUE; }
All I did to it was swap FALSE for TRUE, and it was already running weird, with the *astr++, *bstr++ in the for line. So i moved them down, should still work fine, but I get this.
Quote
Breakpoint 1, str_prefix (astr=0xbf8e90f0 "l\r\n", bstr=0x804971c "look") at mud.c:256 256 if ( astr == NULL ) (gdb) step 261 if ( bstr == NULL ) (gdb) 266 for ( ; *astr; ) (gdb) 268 if ( LOWER(*astr) != LOWER(*bstr) ) (gdb) 266 for ( ; *astr; ) (gdb) 273 *bstr++; (gdb) 268 if ( LOWER(*astr) != LOWER(*bstr) ) (gdb) 277 } (gdb)
So why does it skip the *astr++ and *bstr++.
Yeah…minus the *'s
14 Aug, 2010, Zula110100100 wrote in the 2nd comment:
Votes: 0
Changed the for loop back and here is how the gdb looks for the two, astr is still not incrementing.
for ( ; *astr; astr++, bstr++) { if ( LOWER(*astr) != LOWER(*bstr) ) { return FALSE; } }
All I did to it was swap FALSE for TRUE, and it was already running weird, with the *astr++, *bstr++ in the for line. So i moved them down, should still work fine, but I get this.
256 if ( astr == NULL )
(gdb) step
261 if ( bstr == NULL )
(gdb)
266 for ( ; *astr; )
(gdb)
268 if ( LOWER(*astr) != LOWER(*bstr) )
(gdb)
266 for ( ; *astr; )
(gdb)
273 *bstr++;
(gdb)
268 if ( LOWER(*astr) != LOWER(*bstr) )
(gdb)
277 }
(gdb)
So why does it skip the *astr++ and *bstr++.
Yeah…minus the *'s