}
if (config == 0) {
- config = new char[strlen(DefaultConfig)];
+ config = new char[strlen(DefaultConfig) + 1];
strcpy(config, DefaultConfig);
}
{
FILE *in;
int errorCode = fopen_s(&in, fileName, "r");
- char* fdata;
+ char *fdata;
int count = 0;
const int maxSourceStrings = 5;
- char** return_data = (char**)malloc(maxSourceStrings+1);
+ char** return_data = (char**)malloc(sizeof(char *) * (maxSourceStrings+1));
//return_data[MAX_SOURCE_STRINGS]=NULL;
if (errorCode) {
// source have to figure out how to create revision.h just to get a build\r
// going. However, if it is not updated, it can be a version behind.\r
\r
-#define GLSLANG_REVISION "25392"\r
-#define GLSLANG_DATE "2014/02/18 14:55:42"\r
+#define GLSLANG_REVISION "25400"\r
+#define GLSLANG_DATE "2014/02/18 16:37:57"\r
* letter 'e', or a precision ending (e.g., F or LF).
*/
-int TPpContext::lFloatConst(char* str, int len, int ch, TPpToken* ppToken)
+int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
{
bool HasDecimalOrExponent = false;
int declen, exp, ExpSign;
exp = 0;
str_len=len;
+ char* str = ppToken->name;
if (ch == '.') {
HasDecimalOrExponent = true;
str[len++]=ch;
ppToken->dval = strtod(str, 0);
}
- // Suffix:
- strcpy(ppToken->name, str);
if (isDouble)
return CPP_DOUBLECONSTANT;
} while (ch >= '0' && ch <= '9');
}
if (ch == '.' || ch == 'e' || ch == 'f' || ch == 'E' || ch == 'F' || ch == 'l' || ch == 'L')
- return pp->lFloatConst(ppToken->name, len, ch, ppToken);
+ return pp->lFloatConst(len, ch, ppToken);
// wasn't a float, so must be octal...
if (nonOctal)
ch = pp->getChar();
} while (ch >= '0' && ch <= '9');
if (ch == '.' || ch == 'e' || ch == 'f' || ch == 'E' || ch == 'F' || ch == 'l' || ch == 'L') {
- return pp->lFloatConst(ppToken->name, len, ch, ppToken);
+ return pp->lFloatConst(len, ch, ppToken);
} else {
// Finish handling signed and unsigned integers
int numericLen = len;
ch = pp->getChar();
if (ch >= '0' && ch <= '9') {
pp->ungetChar();
- return pp->lFloatConst(ppToken->name, 0, '.', ppToken);
+ return pp->lFloatConst(0, '.', ppToken);
} else {
pp->ungetChar();
return '.';