summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/nvprogram.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/nvprogram.c b/src/mesa/main/nvprogram.c
index 48b56f27e3a..fa125c40992 100644
--- a/src/mesa/main/nvprogram.c
+++ b/src/mesa/main/nvprogram.c
@@ -1058,7 +1058,9 @@ _mesa_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name,
fragProg = (struct fragment_program *) prog;
for (i = 0; i < fragProg->NumParameters; i++) {
- if (!_mesa_strcmp(fragProg->Parameters[i].Name, (const char *) name)) {
+ if (!_mesa_strncmp(fragProg->Parameters[i].Name,
+ (const char *) name, len) &&
+ fragProg->Parameters[i].Name[len] == 0) {
ASSERT(!fragProg->Parameters[i].Constant);
fragProg->Parameters[i].Values[0] = x;
fragProg->Parameters[i].Values[1] = y;
@@ -1121,7 +1123,9 @@ _mesa_GetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name,
fragProg = (struct fragment_program *) prog;
for (i = 0; i < fragProg->NumParameters; i++) {
- if (!_mesa_strcmp(fragProg->Parameters[i].Name, (const char *) name)) {
+ if (!_mesa_strncmp(fragProg->Parameters[i].Name,
+ (const char *) name, len) &&
+ fragProg->Parameters[i].Name[len] == 0) {
ASSERT(!fragProg->Parameters[i].Constant);
params[0] = fragProg->Parameters[i].Values[0];
params[1] = fragProg->Parameters[i].Values[1];