Skip to content
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

Crash if unused emit native #412

Closed
samphunter opened this issue Apr 2, 2019 · 2 comments
Closed

Crash if unused emit native #412

samphunter opened this issue Apr 2, 2019 · 2 comments

Comments

@samphunter
Copy link

samphunter commented Apr 2, 2019

Issue description:

Using emit sysreq.c native; without using the native elsewhere in the code will crash compiler.

Minimal complete verifiable example (MCVE):

native print(const str[]);

main() {
    new str[12];
    emit {
        push.adr str
        push.c 4
        sysreq.c print
        stack 8
    }
}

Workspace Information:

  • Compiler version: 3.10.9
  • Command line arguments provided (or sampctl version): -;+ -)+
  • Operating System: Windows 8.1
@Daniel-Cortez
Copy link
Contributor

I think I fixed this bug in a local repo back in December, as part of a batch of fixes for the __emit operator. Now I'm just waiting until #393 is merged before making my own PR, in order to avoid any further conflicts.

@Daniel-Cortez
Copy link
Contributor

Fixed in #421.

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

3 participants