summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-11-17 17:34:00 +0100
committerGitHub <noreply@github.com>2019-11-17 17:34:00 +0100
commit608603ac66cc0acc8eb016e0a26675e0d067fcbe (patch)
treee48d7b9154be2359c33052859e9bdd97fd24aa4a /src/map
parent560dd6ac2d7a45fd00de5d97d7fa06d669f83cdf (diff)
parent863dea4e8693047a60da115531e7403997b1ce98 (diff)
downloadhercules-608603ac66cc0acc8eb016e0a26675e0d067fcbe.tar.gz
hercules-608603ac66cc0acc8eb016e0a26675e0d067fcbe.tar.bz2
hercules-608603ac66cc0acc8eb016e0a26675e0d067fcbe.tar.xz
hercules-608603ac66cc0acc8eb016e0a26675e0d067fcbe.zip
Merge pull request #2569 from guilherme-gm/fix-huld-r
Makes HULD .po files read \r as a control character
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 4c2761812..4b7574193 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5400,6 +5400,9 @@ static int script_load_translation_file(const char *file, uint8 lang_id)
if (line[i] == '\\' && line[i+1] == '"') {
VECTOR_PUSH(*msg_ptr, '"');
i++;
+ } else if (line[i] == '\\' && line[i+1] == 'r') {
+ VECTOR_PUSH(*msg_ptr, '\r');
+ i++;
} else {
VECTOR_PUSH(*msg_ptr, line[i]);
}
@@ -5418,6 +5421,9 @@ static int script_load_translation_file(const char *file, uint8 lang_id)
if (line[i] == '\\' && line[i+1] == '"') {
msgctxt[cursor] = '"';
i++;
+ } else if (line[i] == '\\' && line[i+1] == 'r') {
+ msgctxt[cursor] = '\r';
+ i++;
} else {
msgctxt[cursor] = line[i];
}
@@ -5439,6 +5445,9 @@ static int script_load_translation_file(const char *file, uint8 lang_id)
if (line[i] == '\\' && line[i+1] == '"') {
VECTOR_PUSH(msgid, '"');
i++;
+ } else if (line[i] == '\\' && line[i+1] == 'r') {
+ VECTOR_PUSH(msgid, '\r');
+ i++;
} else {
VECTOR_PUSH(msgid, line[i]);
}
@@ -5458,6 +5467,9 @@ static int script_load_translation_file(const char *file, uint8 lang_id)
if (line[i] == '\\' && line[i+1] == '"') {
VECTOR_PUSH(msgstr, '"');
i++;
+ } else if (line[i] == '\\' && line[i+1] == 'r') {
+ VECTOR_PUSH(msgstr, '\r');
+ i++;
} else {
VECTOR_PUSH(msgstr, line[i]);
}