Skip to content

Commit

Permalink
Use char* casting instead of intptr_t as recommended by @brrt
Browse files Browse the repository at this point in the history
  • Loading branch information
samcv committed Apr 8, 2017
1 parent 1d623ba commit eaa730d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/strings/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ MVMint64 MVM_string_index(MVMThreadContext *tc, MVMString *haystack, MVMString *
return -1;
start_ptr = mm_return_32;
} /* If we aren't on a 32 bit boundary then continue from where we left off (unlikely but possible) */
while ( ( (intptr_t)mm_return_32 - (intptr_t)haystack->body.storage.blob_32) % sizeof(MVMGrapheme32) );
while ( ( (char*)mm_return_32 - (char*)haystack->body.storage.blob_32) % sizeof(MVMGrapheme32) );

return (MVMGrapheme32*)mm_return_32 - haystack->body.storage.blob_32;
}
Expand Down

0 comments on commit eaa730d

Please sign in to comment.