Fixed source register emitting in GLSL profile. trunk
authorRyan C. Gordon <icculus@icculus.org>
Mon, 28 Apr 2008 02:05:45 -0400
branchtrunk
changeset 231 be53929fe38f
parent 230 396aa372c7d8
child 232 dbb39e20ed9a
Fixed source register emitting in GLSL profile. Two strings in snprintf() were reversed.
mojoshader.c
--- a/mojoshader.c	Sun Apr 27 22:43:02 2008 -0400
+++ b/mojoshader.c	Mon Apr 28 02:05:45 2008 -0400
@@ -1847,8 +1847,8 @@
 
     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