summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-09 11:40:47 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-09 11:40:47 +0000
commit00eb2beb3a1f31ae991b8162cf577eb8acfbec81 (patch)
tree8c6cda93b057088a9c636a35d3be7a4e8421924a /src/map/map.c
parent50190d04ab59d235a00ee5ea0b6e7211b0d93f4f (diff)
downloadhercules-00eb2beb3a1f31ae991b8162cf577eb8acfbec81.tar.gz
hercules-00eb2beb3a1f31ae991b8162cf577eb8acfbec81.tar.bz2
hercules-00eb2beb3a1f31ae991b8162cf577eb8acfbec81.tar.xz
hercules-00eb2beb3a1f31ae991b8162cf577eb8acfbec81.zip
* Fixed map_waterheight prefixing extra "data\"
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5966 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c8
1 files changed, 6 insertions, 2 deletions
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)