diff --git a/src/base/system.cpp b/src/base/system.cpp index a58868f7b..1a0a04e22 100644 --- a/src/base/system.cpp +++ b/src/base/system.cpp @@ -3402,7 +3402,7 @@ int str_isallnum(const char *str) int str_toint(const char *str) { return str_toint_base(str, 10); } int str_toint_base(const char *str, int base) { return strtol(str, NULL, base); } unsigned long str_toulong_base(const char *str, int base) { return strtoul(str, NULL, base); } -float str_tofloat(const char *str) { return atof(str); } +float str_tofloat(const char *str) { return strtod(str, NULL); } int str_utf8_comp_nocase(const char *a, const char *b) { diff --git a/src/tools/map_replace_area.cpp b/src/tools/map_replace_area.cpp index 3a6157a06..44d509928 100644 --- a/src/tools/map_replace_area.cpp +++ b/src/tools/map_replace_area.cpp @@ -80,10 +80,10 @@ int main(int argc, const char *argv[]) for(int i = 0; i < 2; i++) { - aaaGameAreas[i][0][0] = atof(argv[2 + i * 3]) * 32; //x - aaaGameAreas[i][1][0] = atof(argv[3 + i * 3]) * 32; //y - aaaGameAreas[i][0][1] = aaaGameAreas[i][0][0] + atof(argv[7]) * 32; //x + width - aaaGameAreas[i][1][1] = aaaGameAreas[i][1][0] + atof(argv[8]) * 32; //y + height + aaaGameAreas[i][0][0] = str_tofloat(argv[2 + i * 3]) * 32; //x + aaaGameAreas[i][1][0] = str_tofloat(argv[3 + i * 3]) * 32; //y + aaaGameAreas[i][0][1] = aaaGameAreas[i][0][0] + str_tofloat(argv[7]) * 32; //x + width + aaaGameAreas[i][1][1] = aaaGameAreas[i][1][0] + str_tofloat(argv[8]) * 32; //y + height } cmdline_free(argc, argv);