Skip to content
New issue

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

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

Already on GitHub? # to your account

Identical subexpressions in op_color_number #3148

Closed
ariccio opened this issue Mar 24, 2021 · 2 comments · Fixed by #3155
Closed

Identical subexpressions in op_color_number #3148

ariccio opened this issue Mar 24, 2021 · 2 comments · Fixed by #3155
Labels

Comments

@ariccio
Copy link

ariccio commented Mar 24, 2021

I ran msvc code analysis while waiting for a heroku instance to deploy, and it found this code introduced in 95011cd in operators.cpp:

      if ((op == Sass_OP::DIV || op == Sass_OP::DIV) && rval == 0) {
        // comparison of Fixnum with Float failed?
        throw Exception::ZeroDivisionError(lhs, rhs);
      }

...that can't be right?

@ariccio
Copy link
Author

ariccio commented Mar 24, 2021

Sidenote: there are a few other warnings that I cannot decide if they're valid or not:

Warning C26815 The pointer is dangling because it points at a temporary instance which was destroyed.	libsass ...\libsass-master\libsass-master\src\eval.cpp 1090
Warning C26815 The pointer is dangling because it points at a temporary instance which was destroyed.	libsass ...\libsass-master\libsass-master\src\eval.cpp 1050	

@mgreter mgreter added the For Starters Help wanted label May 20, 2021
@mgreter
Copy link
Contributor

mgreter commented May 20, 2021

I guess it should have been op == Sass_OP::DIV || op == Sass_OP::MOD.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants