From 6b9866e3db9c1fe7a17b2ae40f4c746620b59569 Mon Sep 17 00:00:00 2001 From: ultramage Date: Wed, 15 Aug 2007 09:24:45 +0000 Subject: small mapindex.c typo fix git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11014 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/mapindex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/common/mapindex.c b/src/common/mapindex.c index f169538f7..f2adc833c 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -118,13 +118,13 @@ unsigned short mapindex_name2id(const char* name) #ifdef MAPINDEX_AUTOADD if( mapindex_addmap(i,map_name) ) { - ShowDebug("mapindex_name2id: Auto-added map \"%s\" to position %d\n", indexes[i], i); + ShowDebug("mapindex_name2id: Auto-added map \"%s\" to position %d\n", map_name, i); return i; } - ShowWarning("mapindex_name2id: Failed to auto-add map \"%s\" to position %d!\n", name, i); + ShowWarning("mapindex_name2id: Failed to auto-add map \"%s\" to position %d!\n", map_name, i); return 0; #else - ShowDebug("mapindex_name2id: Map \"%s\" not found in index list!\n", name); + ShowDebug("mapindex_name2id: Map \"%s\" not found in index list!\n", map_name); return 0; #endif } @@ -144,7 +144,7 @@ void mapindex_init(void) char line[1024]; int last_index = -1; int index; - char map_name[1024]; // only MAP_NAME_LENGTH(_EXT) under safe conditions + char map_name[1024]; memset (&indexes, 0, sizeof (indexes)); fp=fopen(mapindex_cfgfile,"r"); @@ -157,7 +157,7 @@ void mapindex_init(void) if(line[0] == '/' && line[1] == '/') continue; - switch (sscanf(line, "%s\t%d", map_name, &index)) + switch (sscanf(line, "%1023s\t%d", map_name, &index)) { case 1: //Map with no ID given, auto-assign index = last_index+1; -- cgit v1.2.3-60-g2f50