summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-08-26 19:14:26 +0200
committerHaru <haru@dotalux.com>2013-08-26 20:46:44 +0200
commit835188124a6e590b406d81803b8d47f07884a9ea (patch)
tree271b52ae3aa595d83f2f031f761983bd4d629a6f /npc
parentcccc5bc9256b196b1f4e9ad881838ad32c8b3424 (diff)
downloadhercules-835188124a6e590b406d81803b8d47f07884a9ea.tar.gz
hercules-835188124a6e590b406d81803b8d47f07884a9ea.tar.bz2
hercules-835188124a6e590b406d81803b8d47f07884a9ea.tar.xz
hercules-835188124a6e590b406d81803b8d47f07884a9ea.zip
Added an integer overflow check on literal values in the script parser
- When attempting to use a value greater than INT_MAX or smaller than INT_MIN (about +/- 2 billions), an error message will be shown and script execution will be aborted. - Corrected some scripts that were attempting to use such values. - Fixed some possible issues when using literal negative values in scripts. Thanks to Ind for his help on this issue (figuring it out and fixing it) Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc')
-rw-r--r--npc/pre-re/guides/guides_lighthalzen.txt2
-rw-r--r--npc/quests/quests_lighthalzen.txt8
-rw-r--r--npc/quests/quests_moscovia.txt18
3 files changed, 14 insertions, 14 deletions
diff --git a/npc/pre-re/guides/guides_lighthalzen.txt b/npc/pre-re/guides/guides_lighthalzen.txt
index c9fb40b5b..466182cd9 100644
--- a/npc/pre-re/guides/guides_lighthalzen.txt
+++ b/npc/pre-re/guides/guides_lighthalzen.txt
@@ -80,7 +80,7 @@ lighthalzen,207,310,5 script Guide#lhz::LhzGuide 852,{
mes "activity, or if you have any";
mes "problems whatsoever.";
if (.@compass_check)
- viewpoint 1,236,276,4,0x99FFFFF;
+ viewpoint 1,236,276,4,0x99FFFF;
break;
case 4:
mes "[Lighthalzen Guide]";
diff --git a/npc/quests/quests_lighthalzen.txt b/npc/quests/quests_lighthalzen.txt
index d67e79c78..1085774e0 100644
--- a/npc/quests/quests_lighthalzen.txt
+++ b/npc/quests/quests_lighthalzen.txt
@@ -4472,10 +4472,10 @@ lighthalzen,346,263,3 script Elder#lhz 846,{
mes "you must search should";
mes "be clear to you now! Don't";
mes "forget these placemarks!";
- viewpoint 1,104,282,1,0xFF99FF33;
- viewpoint 1,105,282,2,0xFF99FF33;
- viewpoint 1,104,281,3,0xFF99FF33;
- viewpoint 1,105,281,4,0xFF99FF33;
+ viewpoint 1,104,282,1,0x99FF33;
+ viewpoint 1,105,282,2,0x99FF33;
+ viewpoint 1,104,281,3,0x99FF33;
+ viewpoint 1,105,281,4,0x99FF33;
next;
mes "[Elder]";
mes "Good luck, youngster.";
diff --git a/npc/quests/quests_moscovia.txt b/npc/quests/quests_moscovia.txt
index bf6177bed..9ef4e6481 100644
--- a/npc/quests/quests_moscovia.txt
+++ b/npc/quests/quests_moscovia.txt
@@ -10970,20 +10970,20 @@ treasure01,24,39,0 script Old Bed#rus38 111,{
mes "...?! What is this?";
next;
mes "- There is a scar on the sheet that seems to have the location !! -";
- viewpoint 1,165,58,1,0xFFFF0000;
- viewpoint 1,61,183,2,0xFFFF0000;
- viewpoint 1,98,118,3,0xFFFF0000;
- viewpoint 1,27,115,4,0xFFFF0000;
+ viewpoint 1,165,58,1,0xFF0000;
+ viewpoint 1,61,183,2,0xFF0000;
+ viewpoint 1,98,118,3,0xFF0000;
+ viewpoint 1,27,115,4,0xFF0000;
next;
mes "["+ strcharinfo(0) +"]";
mes "...This may be?!";
next;
mes "[Voice unidentified]";
mes "Who is there!?";
- viewpoint 2,165,58,1,0xFF00FF00;
- viewpoint 2,61,183,2,0xFF00FF00;
- viewpoint 2,98,118,3,0xFF00FF00;
- viewpoint 2,27,115,4,0xFF00FF00;
+ viewpoint 2,165,58,1,0x00FF00;
+ viewpoint 2,61,183,2,0x00FF00;
+ viewpoint 2,98,118,3,0x00FF00;
+ viewpoint 2,27,115,4,0x00FF00;
emotion 23,1;
next;
mes "["+ strcharinfo(0) +"]";
@@ -11824,4 +11824,4 @@ pay_dun04,163,186,0 script Ghost Tree#rus45 111,{
close;
}
end;
-} \ No newline at end of file
+}