Skip to content

Commit

Permalink
Merge pull request #150 from isidentical/remove-compiler-warnings
Browse files Browse the repository at this point in the history
fix int to size_t comparison by casting int to size_t
  • Loading branch information
olls authored Dec 16, 2019
2 parents b0b66ef + 1d1cae2 commit ce301b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion render_c_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ render_map(PyObject *self, PyObject *args)
frame.buffer[frame.cur_pos] = L'\0';
int n_wprintf_written = wprintf(frame.buffer);

if (n_wprintf_written != frame.cur_pos)
if (n_wprintf_written >= 0 && (size_t)n_wprintf_written != frame.cur_pos)
{
PyErr_SetString(C_RENDERER_EXCEPTION, "wfprint messed up!");
return NULL;
Expand Down

0 comments on commit ce301b9

Please sign in to comment.