summaryrefslogtreecommitdiff
path: root/npc/kafras
diff options
context:
space:
mode:
authorEmistry Haoyan <equinox1991@gmail.com>2019-06-16 18:44:45 +0800
committerHaru <haru@dotalux.com>2019-07-28 18:17:09 +0200
commit371d056df80b6f83484534f64883c3d020c4112d (patch)
tree20d38a8581f3a6159157bfa6644027d4007485bc /npc/kafras
parentef8bc3a8375d4fe9a5f75faf951b3deecb891d57 (diff)
downloadhercules-371d056df80b6f83484534f64883c3d020c4112d.tar.gz
hercules-371d056df80b6f83484534f64883c3d020c4112d.tar.bz2
hercules-371d056df80b6f83484534f64883c3d020c4112d.tar.xz
hercules-371d056df80b6f83484534f64883c3d020c4112d.zip
Sanitize handling of the input() values.
- avoid potential hacks for old scripts that use `input()` script commands. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc/kafras')
-rw-r--r--npc/kafras/dts_warper.txt32
-rw-r--r--npc/kafras/functions_kafras.txt4
2 files changed, 18 insertions, 18 deletions
diff --git a/npc/kafras/dts_warper.txt b/npc/kafras/dts_warper.txt
index a482652ed..057429ae0 100644
--- a/npc/kafras/dts_warper.txt
+++ b/npc/kafras/dts_warper.txt
@@ -1209,8 +1209,8 @@ sec_in02,17,160,4 script Vote Globalvar Girl#yuno 4_F_OPERATION,{
mes "[Christy's Maid]";
mes "Please enter a number among 0 and 1000.";
next;
- input .@input;
- if ((.@input < 0) || (.@input > 1000)) {
+ input(.@input);
+ if (.@input < 0 || .@input > 1000) {
mes "[Christy's Maid]";
mes "The value is incorrect.";
close;
@@ -1223,8 +1223,8 @@ sec_in02,17,160,4 script Vote Globalvar Girl#yuno 4_F_OPERATION,{
mes "[Christy's Maid]";
mes "Please enter a number among 0 and 1000.";
next;
- input .@input;
- if ((.@input < 0) || (.@input > 1000)) {
+ input(.@input);
+ if (.@input < 0 || .@input > 1000) {
mes "[Christy's Maid]";
mes "The value is incorrect.";
close;
@@ -1237,8 +1237,8 @@ sec_in02,17,160,4 script Vote Globalvar Girl#yuno 4_F_OPERATION,{
mes "[Christy's Maid]";
mes "Please enter a number among 0 and 1000.";
next;
- input .@input;
- if ((.@input < 0) || (.@input > 1000)) {
+ input(.@input);
+ if (.@input < 0 || .@input > 1000) {
mes "[Christy's Maid]";
mes "The value is incorrect.";
close;
@@ -1251,8 +1251,8 @@ sec_in02,17,160,4 script Vote Globalvar Girl#yuno 4_F_OPERATION,{
mes "[Christy's Maid]";
mes "Please enter a number among 0 and 3.";
next;
- input .@input;
- if ((.@input < 0) || (.@input > 3)) {
+ input(.@input);
+ if (.@input < 0 || .@input > 3) {
mes "[Christy's Maid]";
mes "The value is incorrect.";
close;
@@ -1265,8 +1265,8 @@ sec_in02,17,160,4 script Vote Globalvar Girl#yuno 4_F_OPERATION,{
mes "[Christy's Maid]";
mes "Please enter a number among 0 and 1000.";
next;
- input .@input;
- if ((.@input < 0) || (.@input > 1000)) {
+ input(.@input);
+ if (.@input < 0 || .@input > 1000) {
mes "[Christy's Maid]";
mes "The value is incorrect.";
close;
@@ -1279,8 +1279,8 @@ sec_in02,17,160,4 script Vote Globalvar Girl#yuno 4_F_OPERATION,{
mes "[Christy's Maid]";
mes "Please enter a number among 0 and 2.";
next;
- input .@input;
- if ((.@input < 0) || (.@input > 2)) {
+ input(.@input);
+ if (.@input < 0 || .@input > 2) {
mes "[Christy's Maid]";
mes "The value is incorrect.";
close;
@@ -1293,8 +1293,8 @@ sec_in02,17,160,4 script Vote Globalvar Girl#yuno 4_F_OPERATION,{
mes "[Christy's Maid]";
mes "Please enter a number among 0 and 2.";
next;
- input .@input;
- if ((.@input < 0) || (.@input > 2)) {
+ input(.@input);
+ if (.@input < 0 || .@input > 2) {
mes "[Christy's Maid]";
mes "The value is incorrect.";
close;
@@ -1307,8 +1307,8 @@ sec_in02,17,160,4 script Vote Globalvar Girl#yuno 4_F_OPERATION,{
mes "[Christy's Maid]";
mes "Please enter a number among 0 and 10000.";
next;
- input .@input;
- if ((.@input < 0) || (.@input > 10000)) {
+ input(.@input);
+ if (.@input < 0 || .@input > 10000) {
mes "[Christy's Maid]";
mes "The value is incorrect.";
close;
diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt
index 90334cc6e..d9253cd13 100644
--- a/npc/kafras/functions_kafras.txt
+++ b/npc/kafras/functions_kafras.txt
@@ -490,7 +490,7 @@ function script F_CheckKafCode {
return;
mes "Enter your storage password:";
@code_ = 0;
- input @code_;
+ input(@code_, 0);
if (@code_ != #kafra_code) {
dispbottom "Wrong storage password.";
close2;
@@ -601,7 +601,7 @@ function script F_EntKafCode {
@kafcode_try = 0;
logmes "Hack: Tried to fit storage password.";
}
- if (input(@code_) == 1) {
+ if (input(@code_, 0) == 1) {
mes "You can't use such big password.";
return 0;
}