fix off-by-one error in intrinsic()

This commit is contained in:
Joel Dice 2009-11-27 21:01:27 -07:00
parent 5b8a7ca566
commit bd72745ff9

View File

@ -2934,7 +2934,7 @@ bool
intrinsic(MyThread* t, Frame* frame, object target) intrinsic(MyThread* t, Frame* frame, object target)
{ {
#define MATCH(name, constant) \ #define MATCH(name, constant) \
(byteArrayLength(t, name) - 1 == sizeof(constant) \ (byteArrayLength(t, name) == sizeof(constant) \
and strcmp(reinterpret_cast<char*>(&byteArrayBody(t, name, 0)), \ and strcmp(reinterpret_cast<char*>(&byteArrayBody(t, name, 0)), \
constant) == 0) constant) == 0)