Mercurial > hg > batmud > maputils
changeset 30:2eceda1c86ab
Fixes
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 10 Dec 2006 02:38:23 +0000 |
parents | 007cbc05d04f |
children | 25e473a82ce3 |
files | mkmap.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mkmap.c Sun Dec 10 02:37:25 2006 +0000 +++ b/mkmap.c Sun Dec 10 02:38:23 2006 +0000 @@ -233,7 +233,7 @@ mapblock_t *tmp; DINT x, y, o; DBOOL isFound; - DCHAR s[1024]; + DCHAR s[4096]; isFound = FALSE; while (!feof(inFile) && !isFound) { @@ -254,10 +254,10 @@ o = y = x = 0; while (!feof(inFile) && (y < tmp->h)) { - DINT i; + DUINT i; fgets(s, sizeof(s), inFile); - for (i = 0; s[i] && s[i] != '\n'; i++); + for (i = 0; i < sizeof(s) && s[i] && s[i] != '\r' && s[i] != '\n'; i++); s[i] = 0; if (strlen(s) != (DUINT) tmp->w) {