Skip to content

Empty warning crashes the compiler #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 3 tasks
Y-Less opened this issue Jul 8, 2018 · 1 comment
Closed
1 of 3 tasks

Empty warning crashes the compiler #339

Y-Less opened this issue Jul 8, 2018 · 1 comment

Comments

@Y-Less
Copy link
Member

Y-Less commented Jul 8, 2018

Is this a BUG REPORT, FEATURE REQUEST or QUESTION?:

  • Bug Report
  • Feature Request
  • Question

What happened:

The compiler crashed.

What you expected to happen:

Not crash - display an empty message.

How to reproduce it (as minimally and precisely as possible):

#warning

Anything else we need to know?:

Environment:

  • Operating System
  • Compiler version
  • How are you invoking the compiler? Pawno, Sublime, vscode, sampctl or command-line?
  • If using sampctl, the version number
@YashasSamaga
Copy link
Member

For whoever decides to work on this issue, please check if the second loop which appears just after tpWARNING: is redundant.

  case tpERROR:
  case tpWARNING:
    while (*lptr<=' ' && *lptr!='\0')
      lptr++;
    while (*lptr<=' ' && *lptr!='\0')
      lptr++;

https://github.com/pawn-lang/compiler/blob/master/source/compiler/sc2.c#L1540-L1543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants