message: Handle empty/no value defines in command-line HLSL definitions
diff: @@ -465,13 +465,19 @@ SPDBChunk::SPDBChunk(void *chunk)
  break;
  char *defstart = c;
  - char *defend = strchr(c, '=');
  + // the definition ends either at the next = or at the next whitespace, whichever
  + // comes first
  + char *defend = strpbrk(c, "= \t\n");
  if(defend == 0)
  break;
  + bool hasValue = defend[0] == '=';
  +
  c = defend + 1;
  + if(hasValue)
  + {
  char *valstart = c;
  // skip to end or next whitespace
  @@ -484,6 +490,13 @@ SPDBChunk::SPDBChunk(void *chunk)
  cmdlineDefines += string(defstart, defend) + " " + string(valstart, valend);
  cmdlineDefines += "\n";
  }
  + else
  + {
  + cmdlineDefines += "#define ";
  + cmdlineDefines += string(defstart, defend);
  + cmdlineDefines += "\n";
  + }
  + }
  }
  Files.push_back(make_pair("@cmdline", cmdlineDefines));
  