Skip to content

Commit

Permalink
Use signed value to properly check whether there's a negative value
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Sep 30, 2013
1 parent ab277e7 commit 5a43bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/builtin/encoding.cpp
Expand Up @@ -520,7 +520,7 @@ namespace rubinius {

void Encoding::string_reverse(uint8_t* start, uint8_t* end, OnigEncodingType* enc) {

size_t len = end - start;
ssize_t len = end - start;
if(len <= 0) return;

uint8_t stack_buf[STACK_BUF_SZ];
Expand Down

0 comments on commit 5a43bda

Please sign in to comment.