From ecb88cd8b73307501ce7a89f79f33d4e1e054d5b Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Sat, 16 Jun 2012 09:09:45 +0100 Subject: [PATCH] c3program: Include digits in uniform names Somehow they were missing Signed-off-by: Michel Pollet --- examples/shared/libc3/src/c3program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/shared/libc3/src/c3program.c b/examples/shared/libc3/src/c3program.c index 86e4404..f045de8 100644 --- a/examples/shared/libc3/src/c3program.c +++ b/examples/shared/libc3/src/c3program.c @@ -144,14 +144,14 @@ c3program_load_shader( char * sep = line->str; char * uniform = strsep(&sep, " \t"); char * unitype = strsep(&sep, " \t"); - char * uniname = strsep(&sep, " \t"); + char * uniname = strsep(&sep, " \t=;"); /* * found a parameter, extract it's type & name */ if (uniform && unitype && uniname) { // trim semicolons etc char *cl = uniname; - while (isalpha(*cl) || *cl == '_') + while (isalpha(*cl) || *cl == '_' || isdigit(*cl)) cl++; *cl = 0; str_p name = str_new(uniname); -- 2.39.5