Index: pol-core/pol/module/basicmod.cpp =================================================================== --- pol-core/pol/module/basicmod.cpp (revision 700) +++ pol-core/pol/module/basicmod.cpp (working copy) @@ -139,8 +139,13 @@ if ( !index ) index = 1; - if ( static_cast(len) > (string->length()-index) ) + // I think there is a problem here because + // POL indexes are 1-based so it functions + // correctly now (could you check it?) + if ( static_cast(len) > (string->length()-(index-1)) ) return new BError("Length out of range"); + //if ( static_cast(len) > (string->length()-index) ) + // return new BError("Length out of range"); if ( len < 0 ) return new BError("Length must not be negative");