• R/O
  • SSH
  • HTTPS

globalbase: Commit


Commit MetaInfo

Revisão5964 (tree)
Hora2019-05-27 20:51:17
Autorjoshua

Mensagem de Log

array

Mudança Sumário

Diff

--- modules/tinyState/trunk/src/h/ts/c++/sArray.h (revision 5963)
+++ modules/tinyState/trunk/src/h/ts/c++/sArray.h (revision 5964)
@@ -159,8 +159,13 @@
159159 delete[] this->ary;
160160 }
161161 __TYPE& operator[](int index) {
162- if ( expand == 0 )
162+ if ( index < 0 )
163+ stdObject::panic("ARRAY OVER RUN!!");
164+ if ( expand == 0 ) {
165+ if ( index >= leng )
166+ stdObject::panic("ARRAY OVER RUN EXPAND!!");
163167 return ary[index];
168+ }
164169 if ( index >= leng )
165170 length(index+1);
166171 return ary[index];
Show on old repository browser