From: Michel Pollet Date: Sat, 16 Jun 2012 08:09:45 +0000 (+0100) Subject: c3program: Include digits in uniform names X-Git-Tag: v1.0~69 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=ecb88cd8b73307501ce7a89f79f33d4e1e054d5b;p=sx%2Fsimavr.git c3program: Include digits in uniform names Somehow they were missing Signed-off-by: Michel Pollet --- 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);