From 776fb980db7e5a966c2ec3f3fce8e27c43a56918 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 14 Apr 2002 08:00:49 +0000 Subject: [PATCH] fscanf bugfixes --- src/common/kernel/border.c | 2 +- src/common/kernel/item.c | 2 +- src/mapper/logging.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/kernel/border.c b/src/common/kernel/border.c index 2742ced80..d6c6ae786 100644 --- a/src/common/kernel/border.c +++ b/src/common/kernel/border.c @@ -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"); diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index d25c18e3e..c401cba81 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -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; diff --git a/src/mapper/logging.c b/src/mapper/logging.c index a96b852f7..cce31651e 100644 --- a/src/mapper/logging.c +++ b/src/mapper/logging.c @@ -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) {