0

overlay-mineral: fix tuple parse data type

Was a byte, should've been an unsigned short.

Fixes #1801.
This commit is contained in:
Nicolas F
2020-07-03 13:06:46 +02:00
parent 27eabb08a5
commit d362e1512d
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@
// increment this value if you've made a change to the c extension // increment this value if you've made a change to the c extension
// and want to force users to rebuild // and want to force users to rebuild
#define OVERVIEWER_EXTENSION_VERSION 85 #define OVERVIEWER_EXTENSION_VERSION 86
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>

View File

@@ -111,7 +111,7 @@ overlay_mineral_start(void* data, RenderState* state, PyObject* support) {
for (i = 0; i < minerals_size; i++) { for (i = 0; i < minerals_size; i++) {
PyObject* mineral = PyList_GET_ITEM(opt, i); PyObject* mineral = PyList_GET_ITEM(opt, i);
if (!PyArg_ParseTuple(mineral, "b(bbb)", &(minerals[i].block), &(minerals[i].r), &(minerals[i].g), &(minerals[i].b))) { if (!PyArg_ParseTuple(mineral, "H(bbb)", &(minerals[i].block), &(minerals[i].r), &(minerals[i].g), &(minerals[i].b))) {
free(minerals); free(minerals);
self->minerals = NULL; self->minerals = NULL;
return true; return true;