diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 7370d0a1..4545f557 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -3276,8 +3276,11 @@ namespace bgfx { namespace gl *array = '\0'; array++; char* end = strchr(array, ']'); - *end = '\0'; - offset = atoi(array); + if (NULL != end) + { // Some devices (Amazon Fire) might not return terminating brace. + *end = '\0'; + offset = atoi(array); + } } switch (gltype)