Skip to content

Commit

Permalink
added type casts for MB_CUR_MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Starke committed Sep 7, 2016
1 parent 1e5fd76 commit 683e0d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librexgen/string/simplestring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ size_t SimpleString::to_external_string(char* dst, size_t buffer_size) const {

memset(&state, '\0', sizeof(state));
for (idx=0; idx<length; ++idx) {
if (buffer_size < MB_CUR_MAX) {
if (buffer_size < (size_t)MB_CUR_MAX) {
return (size_t)-1;
}

Expand All @@ -200,7 +200,7 @@ size_t SimpleString::to_external_string(char* dst, size_t buffer_size) const {
ptr += nbytes;
}

if (buffer_size < MB_CUR_MAX) {
if (buffer_size < (size_t)MB_CUR_MAX) {
return (size_t)-1;
}

Expand Down

0 comments on commit 683e0d3

Please sign in to comment.