Skip to content

Commit 523e243

Browse files
committed
Fixed encode() crash for large resultsets.
1 parent 8d634ff commit 523e243

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mapcodemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static PyObject *encode(PyObject *self, PyObject *args)
117117

118118
// printf("encode: territorystring: %s, code: %d\n", territoryname, territorycode);
119119

120-
char *mapcode_results[MAX_NR_OF_MAPCODE_RESULTS];
120+
char *mapcode_results[2 * MAX_NR_OF_MAPCODE_RESULTS];
121121
int n = encodeLatLonToMapcodes_Deprecated(mapcode_results, latitude, longitude, territorycode, extra_digits);
122122
if (n > 0) {
123123
result = PyList_New(n);

0 commit comments

Comments
 (0)