fix a subtle bug with small int->string conversions

master
Daniel Kolesa 2016-09-10 15:31:13 +02:00
parent 87ed89ece8
commit 3e0b35e427
1 changed files with 2 additions and 1 deletions

View File

@ -776,7 +776,8 @@ static ostd::Uint32 *runcode(CsState &cs, ostd::Uint32 *code, CsValue &result) {
char((op >> 16) & 0xFF), char((op >> 16) & 0xFF),
char((op >> 24) & 0xFF), '\0' char((op >> 24) & 0xFF), '\0'
}; };
args[numargs++].set_str(s); /* gotta cast or r.size() == potentially 3 */
args[numargs++].set_str(static_cast<char const *>(s));
continue; continue;
} }
case CsCodeVal | CsRetNull: case CsCodeVal | CsRetNull: