Skip to content

Commit

Permalink
Fixed source register emitting in GLSL profile.
Browse files Browse the repository at this point in the history
Two strings in snprintf() were reversed.

--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 28, 2008
1 parent 1a2a6ec commit eacf1ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mojoshader.c
Expand Up @@ -1847,8 +1847,8 @@ static char *make_GLSL_srcarg_string(Context *ctx, const int idx,

const char *shader_type_str = get_shader_type_string(ctx);
char *retval = get_scratch_buffer(ctx);
snprintf(retval, SCRATCH_BUFFER_SIZE, "%s_%s%s%s%s%s", shader_type_str,
premod_str, regtype_str, regnum_str, swiz_str, postmod_str);
snprintf(retval, SCRATCH_BUFFER_SIZE, "%s%s_%s%s%s%s", premod_str,
shader_type_str, regtype_str, regnum_str, swiz_str, postmod_str);
// !!! FIXME: make sure the scratch buffer was large enough.
return retval;
} // make_GLSL_srcarg_string
Expand Down

0 comments on commit eacf1ba

Please sign in to comment.