Skip to content

Commit

Permalink
Unbust MSVC build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Mar 7, 2014
1 parent 48da760 commit 3787171
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/strings/ops.c
Expand Up @@ -1384,10 +1384,12 @@ void MVM_string_cclass_init(MVMThreadContext *tc) {
/* Checks if the character at the specified offset is a member of the
* indicated character class. */
MVMint64 MVM_string_is_cclass(MVMThreadContext *tc, MVMint64 cclass, MVMString *s, MVMint64 offset) {
MVMCodepoint32 cp;

if (offset < 0 || offset >= NUM_GRAPHS(s))
return 0;
MVMCodepoint32 cp = MVM_string_get_codepoint_at(tc, s, offset);

cp = MVM_string_get_codepoint_at(tc, s, offset);
if (cp < 0) {
MVM_exception_throw_adhoc(tc, "Negative character fed to cclass: '%d'", cp);
}
Expand Down

0 comments on commit 3787171

Please sign in to comment.