From 00eb2beb3a1f31ae991b8162cf577eb8acfbec81 Mon Sep 17 00:00:00 2001 From: Lance Date: Sun, 9 Apr 2006 11:40:47 +0000 Subject: * Fixed map_waterheight prefixing extra "data\" git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5966 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index b580ce07e..a6702c3cc 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2351,7 +2351,7 @@ int map_setwaterheight(int m, char *mapname, int height) { */ int map_waterheight(char *mapname) { char fn[256]; - char *rsw; + char *rsw, *found; float whtemp; int wh; @@ -2365,7 +2365,11 @@ int map_waterheight(char *mapname) { //Look up for the rsw sprintf(fn,"data\\%s",mapname); - sprintf(fn,"data\\%s",grfio_find_file(fn)); + found = grfio_find_file(fn); + if(!strstr(found,"data\\")) + sprintf(fn,"data\\%s", found); + else + strcpy(fn, found); rsw = strstr(fn, "."); if (rsw && strstr(fn, ".rsw") == NULL) -- cgit v1.2.3-60-g2f50