gallium/util: Fix parsing of options with underscore.

For example

  GALLIVM_DEBUG=no_brilinear

which was being parsed as two options, "no" and "brilinear".
This commit is contained in:
José Fonseca 2012-06-27 11:15:53 +01:00
parent 789436f1e0
commit d1c5ea9207
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ static boolean str_has_option(const char *str, const char *name)
* we compare 'start' up to 'str-1' with 'name'. */
while (1) {
if (!*str || !isalnum(*str)) {
if (!*str || !(isalnum(*str) || *str == '_')) {
if (str-start == name_len &&
!memcmp(start, name, name_len)) {
return TRUE;