From 934f4af797ab3f35c249cc70a1631696328f16d0 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Fri, 17 Dec 2010 22:54:13 +0000 Subject: * Fixed label definitions silently overwriting built-in script functions (bugreport:2806, follow up to r8027). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14600 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 1 + src/map/script.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 98d0611f9..1e9c1cc52 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -1,6 +1,7 @@ Date Added 2010/12/17 + * Fixed label definitions silently overwriting built-in script functions (bugreport:2806, follow up to r8027). [Ai4rei] * Added temporary check to skill_delunitgroup to prevent crashes when 'group' is NULL and added some debug messages to track down the source of the crash (bugreport:3504). [Ai4rei] * Spellchecked script_commands.txt. [Ai4rei] * Random script engine clean-ups that have accumulated over time. [Ai4rei] diff --git a/src/map/script.c b/src/map/script.c index 19961c438..04cb0593b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -739,8 +739,8 @@ void set_label(int l,int pos, const char* script_pos) { int i,next; - if(str_data[l].type==C_INT || str_data[l].type==C_PARAM) - { //Prevent overwriting constants values and parameters [Skotlex] + if(str_data[l].type==C_INT || str_data[l].type==C_PARAM || str_data[l].type==C_FUNC) + { //Prevent overwriting constants values, parameters and built-in functions [Skotlex] disp_error_message("set_label: invalid label name",script_pos); return; } -- cgit v1.2.3-60-g2f50