Skip to content

Commit

Permalink
Merge pull request #87 from 0x7CFE/fix/string_primitive
Browse files Browse the repository at this point in the history
Fix string primitives
  • Loading branch information
kpp committed Aug 10, 2015
2 parents c7defb6 + 02e6018 commit d7912a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/primitives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ TObject* callPrimitive(uint8_t opcode, TObjectArray* arguments, bool& primitiveF
//valueObject is not used in primitive stringAtPut
}

if (isSmallInteger(string) || string->getClass() != globals.stringClass || !isSmallInteger(indexObject)) {
if ( !isSmallInteger(indexObject) || isSmallInteger(string) ) {
primitiveFailed = true;
break;
}
Expand Down

0 comments on commit d7912a4

Please sign in to comment.