- Appended to comment:
drh added on 2009-12-29 20:53:21:
See check-in 5d16ca43f192. - Change resolution to "Fixed"
- Change status to "Fixed"
- Appended to comment:
rwilson added on 2009-12-29 18:16:42:
i think you are correct. it should be i. as is, this code will always return the first two chars of the ip address.static char *ipPrefix(const char *zIP){ int i, j; for(i=j=0; zIP[bad-link: i]i; i++){ if( zIP[bad-link: i]i=='.' ){ j++; if( j==2 ) break; } } return mprintf("%.*s", j, zIP); }
- Change resolution to "Open"
- Change comment to "You sure that return mprintf("%.*s", j, zIP); is correct? It's been a long time having programmed in C, but I think you should use i instead of j (j will be 2 at most)."
- Change foundin to "c5e94568c7"
- Change status to "Open"
- Change title to "Bug in ipPrefix (Check-in [86cbb69af2])?"
- Change type to "Code_Defect"