Skip to content

Commit

Permalink
Bug fix - char is signed on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Nov 23, 2017
1 parent d9c69ab commit 734538c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/b6b_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ static enum b6b_res b6b_str_proc_ord(struct b6b_interp *interp,
if (!b6b_proc_get_args(interp, args, "os", NULL, &s) || (s->slen != 1))
return B6B_ERR;

return b6b_return_int(interp, (b6b_int)s->s[0]);
return b6b_return_int(interp, (b6b_int)(unsigned char)s->s[0]);
}

static enum b6b_res b6b_str_proc_chr(struct b6b_interp *interp,
Expand Down

0 comments on commit 734538c

Please sign in to comment.