ianfhunter / GNOLL

GNOLL is an efficient dice notation parser for multiple programming languages that supports a wide set of dice notation
https://www.ianhunter.ie/GNOLL/
GNU General Public License v3.0
39 stars 23 forks source link

Fix for 465 #470

Closed ianfhunter closed 4 months ago

ianfhunter commented 4 months ago

Description

This should fix #465, as the test case is working for me locally. The issue was a bad assignment in the part of the if statement that checked if the Keep amount was too high. The local pointer for the function changed, but not the caller's pointer, when the function finished, the wrong memory was set.

:bug: Fixes #465 🧹 Cleanup of variable name differences 🧹 drop/keep functions properly reflect their function - not copy paste 🧪 New test to ensure this case does not fail again

How Has This Been Tested

Added a test for this scenario in pytest suite

Change Type

Checklist

ianfhunter commented 4 months ago

Hmm Fixed in C but python crashing. Usually that means there's still some memory issue around

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud