[mw-devel] MW3 r1121 - trunk/src
psycodom at sucs.org
psycodom at sucs.org
Wed Dec 9 22:31:31 GMT 2009
Author: psycodom
Date: 2009-12-09 22:31:31 +0000 (Wed, 09 Dec 2009)
New Revision: 1121
Modified:
trunk/src/uri.c
Log:
Fixes a segv fault where existing mwuri dbs can have NULL flags rather than ""
Modified: trunk/src/uri.c
===================================================================
--- trunk/src/uri.c 2009-12-08 16:31:38 UTC (rev 1120)
+++ trunk/src/uri.c 2009-12-09 22:31:31 UTC (rev 1121)
@@ -84,13 +84,16 @@
uriFlagList *fl = uriflagtable;
flagstr[0] = '\0';
- while(fl->flag)
+ if(shortflags != NULL)
{
- if(strcasestr(shortflags, fl->flagstr))
+ while(fl->flag)
{
- n += snprintf(&flagstr[n], len-n, " %s", fl->list_desc);
+ if(strcasestr(shortflags, fl->flagstr))
+ {
+ n += snprintf(&flagstr[n], len-n, " %s", fl->list_desc);
+ }
+ fl++;
}
- fl++;
}
}
More information about the mw-devel
mailing list