Переглянути джерело

Add the proposed patch to prevent make assignment to the reserved word base.

mingodad 12 роки тому
батько
коміт
49b7966419
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      SquiLu/squirrel/sqcompiler.cpp

+ 1 - 0
SquiLu/squirrel/sqcompiler.cpp

@@ -528,6 +528,7 @@ public:
 			SQInteger pos = _es.epos;
 			SQInteger pos = _es.epos;
 
 
 			if(ds == EXPR) Error(_SC("can't assign expression"));
 			if(ds == EXPR) Error(_SC("can't assign expression"));
+			else if(ds == BASE) Error(_SC("'base' cannot be modified"));
 			Lex(); Expression();
 			Lex(); Expression();
 
 
 			switch(op){
 			switch(op){