Skip to content

Commit

Permalink
Fix for Windows-specific mruby C++ issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dabroz authored and matz committed Nov 24, 2016
1 parent 44c3859 commit c2a60eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mrbgems/mruby-print/src/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ printstr(mrb_state *mrb, mrb_value obj)
int mlen = RSTRING_LEN(obj);
char* utf8 = RSTRING_PTR(obj);
int wlen = MultiByteToWideChar(CP_UTF8, 0, utf8, mlen, NULL, 0);
wchar_t* utf16 = mrb_malloc(mrb, (wlen+1) * sizeof(wchar_t));
wchar_t* utf16 = (wchar_t*)mrb_malloc(mrb, (wlen+1) * sizeof(wchar_t));
if (utf16 == NULL) return;
if (MultiByteToWideChar(CP_UTF8, 0, utf8, mlen, utf16, wlen) > 0) {
utf16[wlen] = 0;
Expand Down

0 comments on commit c2a60eb

Please sign in to comment.