forked from github/server
fscanf bugfixes
This commit is contained in:
parent
166b347aeb
commit
776fb980db
|
@ -109,7 +109,7 @@ read_borders(FILE * f)
|
|||
fscanf(f, "%d %d %d %d ", &fx, &fy, &tx, &ty);
|
||||
bid = ++nextborder;
|
||||
} else {
|
||||
fscanf(f, "%ud %d %d %d %d", &bid, &fx, &fy, &tx, &ty);
|
||||
fscanf(f, "%u %d %d %d %d", &bid, &fx, &fy, &tx, &ty);
|
||||
}
|
||||
type = find_bordertype(zText);
|
||||
assert(type || !"border type not registered");
|
||||
|
|
|
@ -2432,7 +2432,7 @@ rt_read(FILE * F)
|
|||
{
|
||||
resource_type * rt = calloc(sizeof(resource_type), 1);
|
||||
unsigned int hash;
|
||||
int i = fscanf(F, "%ud\n", &hash);
|
||||
int i = fscanf(F, "%u\n", &hash);
|
||||
if (i==0 || i==EOF) {
|
||||
free(rt);
|
||||
return NULL;
|
||||
|
|
|
@ -36,7 +36,7 @@ log_read(const char * filename)
|
|||
char buf[64];
|
||||
|
||||
while (*fp) fp=&(*fp)->next;
|
||||
fscanf(log, "LOGVERSION %ud\n", &global.data_version);
|
||||
fscanf(log, "LOGVERSION %u\n", &global.data_version);
|
||||
while (!feof(log)) {
|
||||
if(fscanf(log, "%s", buf) == EOF) break;
|
||||
if (strcmp(buf, "UNIT")==0) {
|
||||
|
|
Loading…
Reference in New Issue