Skip to content

Commit

Permalink
Fixed preprocessor indent and endline output.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 12, 2009
1 parent 8f44e4a commit 44b8bb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mojoshader_preprocessor.c
Expand Up @@ -659,7 +659,7 @@ include_close = (MOJOSHADER_includeClose) 0x1;
// tokens. For example, after a semicolon. This allows HLSL code to
// be mostly readable, instead of a stream of tokens.
if (token == ((Token) '\n'))
; // ignore.
isnewline = nl; // this doesn't actually care about '\n' ...

else if ( (token == ((Token) '}')) || (token == ((Token) ';')) )
{
Expand All @@ -683,6 +683,7 @@ include_close = (MOJOSHADER_includeClose) 0x1;
{
out_of_memory =
(!add_to_buffer(&buffer,endline,sizeof (endline),m,d)) ||
(!indent_buffer(&buffer, indent, 1, m, d)) ||
(!add_to_buffer(&buffer, "{", 1, m, d)) ||
(!add_to_buffer(&buffer,endline,sizeof (endline),m,d));
indent++;
Expand Down

0 comments on commit 44b8bb4

Please sign in to comment.