summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-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)