Skip to content

Commit

Permalink
Fix wrong data type
Browse files Browse the repository at this point in the history
related #2
  • Loading branch information
LagoLunatic committed Apr 9, 2021
1 parent 2e3cb60 commit 7c9bcf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyfasttextureutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static PyObject* pyfasttextureutils_color_exchange(PyObject* self, PyObject* arg
return NULL; // Error already raised
}

unsigned char* src;
char* src;
src = PyBytes_AsString(src_image_bytes);
if (!src) {
return NULL; // Error already raised
Expand All @@ -155,7 +155,7 @@ static PyObject* pyfasttextureutils_color_exchange(PyObject* self, PyObject* arg
return NULL;
}

unsigned char* mask;
char* mask;
if (mask_image_bytes == Py_None) {
mask = NULL;
} else {
Expand Down Expand Up @@ -189,7 +189,7 @@ static PyObject* pyfasttextureutils_color_exchange(PyObject* self, PyObject* arg
s_change = replacement_s - base_s;
v_change = replacement_v - base_v;

unsigned char* dst;
char* dst;
dst = malloc(src_size);
if(!dst) {
return PyErr_NoMemory();
Expand Down

0 comments on commit 7c9bcf3

Please sign in to comment.