Text input commands should accept half-width characters

Although its dialog message says "Half-width characters cannot be used",
System3.9 does not prevent users from entering half-width characters.
This commit is contained in:
kichikuou
2020-09-05 22:40:23 +09:00
parent 38758569bb
commit 05cca544c6
2 changed files with 8 additions and 17 deletions
+4 -10
View File
@@ -428,10 +428,8 @@ void commands2F26() {
t3 = fromUTF8(mi_param.newstring);
/* 全角文字以外は不可 */
if (nact->encoding != SHIFT_JIS || !sjis_has_hankaku(t3)) {
v_strcpy(dst_no -1, t3);
}
v_strcpy(dst_no -1, t3);
free(t1);
free(t2);
free(t3);
@@ -935,12 +933,8 @@ void commands2F57() {
*vResult = 65535;
} else {
t3 = fromUTF8(p.newstring);
if (nact->encoding != SHIFT_JIS || !sjis_has_hankaku(t3)) {
v_strcpy(eStrVar -1, t3);
*vResult = v_strlen(eStrVar -1);
} else {
*vResult = 65535;
}
v_strcpy(eStrVar -1, t3);
*vResult = v_strlen(eStrVar -1);
free(t3);
}
free(t1);
+4 -7
View File
@@ -124,10 +124,8 @@ void commandMI() { /* T2 */
t3 = fromUTF8(mi_param.newstring);
/* 全角文字以外は不可 */
if (nact->encoding != SHIFT_JIS ||!sjis_has_hankaku(t3)) {
v_strcpy(dst_no -1, t3);
}
v_strcpy(dst_no -1, t3);
free(t1);
free(t2);
free(t3);
@@ -355,9 +353,8 @@ void commandMJ() {
if (mj_param.newstring == NULL) return;
t2 = fromUTF8(mj_param.newstring);
if (nact->encoding != SHIFT_JIS || !sjis_has_hankaku(t2)) {
v_strcpy(num -1, t2);
}
v_strcpy(num -1, t2);
free(t1);
free(t2);
DEBUG_COMMAND("MJ %d,%d,%d,%d,%d:\n", num, x, y, h, max_len);