aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Config/dotconfpp/dotconfpp.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-06 14:01:44 -0600
committermegamage <none@none>2008-12-06 14:01:44 -0600
commitc5593ef779a4ba7bbe9df391bc0defd3bf6c33a1 (patch)
treeae0cb37bc8f5de0d33bddae95747d7d2162cd8ce /src/shared/Config/dotconfpp/dotconfpp.cpp
parent72edfea129c244cde9a18b3227f775250197ec99 (diff)
*Update to Mangos 6880. Source: Mangos.
*Skip 6878, 6871. *Main change: change cell size, add is3dDistance for IsWithinDistInMap and isVisibleForOrDetect. --HG-- branch : trunk
Diffstat (limited to 'src/shared/Config/dotconfpp/dotconfpp.cpp')
-rw-r--r--src/shared/Config/dotconfpp/dotconfpp.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/Config/dotconfpp/dotconfpp.cpp b/src/shared/Config/dotconfpp/dotconfpp.cpp
index 34be713138d..543e8acf1f4 100644
--- a/src/shared/Config/dotconfpp/dotconfpp.cpp
+++ b/src/shared/Config/dotconfpp/dotconfpp.cpp
@@ -340,6 +340,11 @@ int DOTCONFDocument::setContent(const char * _fileName)
error(0, NULL, "failed to open file '%s': %s", fileName, strerror(errno));
return -1;
}
+ // Try read utf8 header and skip it if exist
+ uint32 utf8header = 0;
+ fgets((char*)&utf8header, 4, file); // Try read header
+ if (utf8header!=0x00BFBBEF) // If not exist
+ fseek(file, 0, SEEK_SET); // Reset read position
ret = parseFile();