Skip to content

Commit

Permalink
Fixed assembler error line numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 12, 2009
1 parent 22b416d commit 171fc05
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions mojoshader_assembler.c
Expand Up @@ -106,14 +106,8 @@ static void failf(Context *ctx, const char *fmt, ...)
error_position = -2;
break;
case MOJOSHADER_PARSEPHASE_WORKING:
// !!! FIXME: fname == base source file if output_pos == 0.
if (ctx->output_len > 0)
{
const size_t idx = ctx->output_len - 1;
linenum = ctx->token_to_source[idx].line;
fname = ctx->token_to_source[idx].filename;
} // if
error_position = linenum;
fname = preprocessor_sourcepos(ctx->preprocessor, &linenum);
error_position = (int) linenum;
break;
case MOJOSHADER_PARSEPHASE_DONE:
error_position = -1;
Expand Down

0 comments on commit 171fc05

Please sign in to comment.