Created
October 3, 2013 22:46
-
-
Save jnthn/6818287 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/6model/reprs/P6opaque.c b/src/6model/reprs/P6opaque.c | |
index acbfa96..db21971 100644 | |
--- a/src/6model/reprs/P6opaque.c | |
+++ b/src/6model/reprs/P6opaque.c | |
@@ -383,6 +383,8 @@ static void bind_attribute(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, | |
break; | |
} | |
case MVM_reg_str: { | |
+ if (value_reg.s && ((MVMObject *)value_reg.s)->st->REPR->ID != MVM_REPR_ID_MVMString) | |
+ MVM_exception_throw_adhoc(tc, "P6opaque: string is not a string"); | |
if (attr_st) | |
attr_st->REPR->box_funcs.set_str(tc, attr_st, root, | |
(char *)data + repr_data->attribute_offsets[slot], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment