335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
|
}
// Level strings
i=0;
while(p<end) {
if(i>=max_objects) goto bad3;
q=memchr(p,0,end-p);
if(!q) goto bad1;
levelstrings=realloc(levelstrings,(i+1)*sizeof(char*));
if(!levelstrings) fatal("Allocation failed\n");
levelstrings[i]=strdup(p);
if(!levelstrings[i]) fatal("Allocation failed\n");
p=q+1;
i++;
}
nlevelstrings=i;
|
|
|
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
|
}
// Level strings
i=0;
while(p<end) {
if(i>=max_objects) goto bad3;
q=memchr(p,0,end-p);
if(!q) goto bad1;
levelstrings=realloc(levelstrings,(i+1)*sizeof(unsigned char*));
if(!levelstrings) fatal("Allocation failed\n");
levelstrings[i]=strdup(p);
if(!levelstrings[i]) fatal("Allocation failed\n");
p=q+1;
i++;
}
nlevelstrings=i;
|