Fixed a problem where entering a single character on a line would cause
an assertion failure. git-svn-id: http://picoc.googlecode.com/svn/trunk@450 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
5efb924e6a
commit
d63865fd83
4
lex.c
4
lex.c
|
@ -452,9 +452,9 @@ void *LexTokenise(struct LexState *Lexer, int *TokenLen)
|
||||||
int MemUsed = 0;
|
int MemUsed = 0;
|
||||||
int ValueSize;
|
int ValueSize;
|
||||||
#ifdef FANCY_ERROR_REPORTING
|
#ifdef FANCY_ERROR_REPORTING
|
||||||
int ReserveSpace = (Lexer->End - Lexer->Pos) * 4 + 1;
|
int ReserveSpace = (Lexer->End - Lexer->Pos) * 4 + 16;
|
||||||
#else
|
#else
|
||||||
int ReserveSpace = (Lexer->End - Lexer->Pos) * 3 + 1;
|
int ReserveSpace = (Lexer->End - Lexer->Pos) * 3 + 16;
|
||||||
#endif
|
#endif
|
||||||
void *TokenSpace = HeapAllocStack(ReserveSpace);
|
void *TokenSpace = HeapAllocStack(ReserveSpace);
|
||||||
char *TokenPos = (char *)TokenSpace;
|
char *TokenPos = (char *)TokenSpace;
|
||||||
|
|
Loading…
Reference in a new issue