-
Notifications
You must be signed in to change notification settings - Fork 104
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
Fixed possibility to load the same script more than once. #660
Fixed possibility to load the same script more than once. #660
Conversation
Fix format
Fixed placement of function CanonicaliseScriptName()
You can load scripts twice, and I've seen this exploited to reload a script by loading the second one first, sharing data between them, then closing the original. I don't know if those weird exploits are worth preserving this behaviour for, but it is at least worth discussing. Having said that, I've also seen this exploit done using relative paths like |
Now that function only adds .amx extension (if needed) and replaces path delimiters (if it present)
No, it's not fixed (at least in RC2 release).
It's quite useful way to save data while restarting scripts, but the way to reload scripts shouldn't be so weird. I made this fix because I was getting errors when entering commands My config file looks like this:
Entering |
Oh, well then...
In that case I'd agree. Fix this so |
The last commit is ready for review. |
Added an overload to function utils::endWith() to compare the last char.
It was resolved, but wasn't marked as such.
User could load the same script more than once the following ways:
loadscript
with rel. path to script that contains different slashes, e.g.Added new function
utils::CanonicaliseScriptName()
that canonized path to script and adds an extension to the name of the script if it is missing. This ensures that thePawnScript::name_
will always contain the name + extension of script.