diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 1fa209c..a97bf99 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -97,6 +97,7 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx, ? 100 : 110; const unsigned highest_version = (ctx->API == API_OPENGL) ? ctx->Const.GLSLVersion : 100; + char *supported = ralloc_strdup(this, ""); for (unsigned ver = lowest_version; ver <= highest_version; ver += 10) { @@ -104,10 +105,11 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx, ? "" : ((ver == highest_version) ? ", and " : ", "); - ralloc_asprintf_append(& supported, "%s%d.%02d%s", + char* part = ralloc_asprintf(this, "%s%d.%02d%s", prefix, ver / 100, ver % 100, (ver == 100) ? " ES" : ""); + ralloc_strcat(&supported, part); } this->supported_version_string = supported;