Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bizzehdee committed Sep 23, 2024
1 parent 9783103 commit b0d86e1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion DScript/JITException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

namespace DScript
{
class JITException : Exception
public class JITException : Exception
{
public JITException()
{
Expand Down
80 changes: 40 additions & 40 deletions DScript/ScriptException.cs
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
/*
Copyright (c) 2014 - 2020 Darren Horrocks
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

using System;
/*
Copyright (c) 2014 - 2020 Darren Horrocks
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

using System;
using System.Runtime.Serialization;

namespace DScript
{
[Serializable]
public class ScriptException : Exception
{
public ScriptException(string msg)
: base(msg)
{

}

public ScriptException(string msg, Exception innerException)
: base(msg, innerException)
{

namespace DScript
{
[Serializable]
public class ScriptException : Exception
{
public ScriptException(string msg)
: base(msg)
{

}

public ScriptException(string msg, Exception innerException)
: base(msg, innerException)
{

}

protected ScriptException(SerializationInfo serializationInfo, StreamingContext streamingContext)
: base(serializationInfo, streamingContext)
{

}
}
}
}
}
4 changes: 2 additions & 2 deletions DScript/ScriptVar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ public ScriptVar(string val, Flags flags)
if (flags.HasFlag(Flags.Integer))
{
var strData = val;
if (strData.StartsWith("0x"))
if (strData.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
{
intData = Convert.ToInt32(strData, 16);
}
else if(strData.StartsWith("0"))
else if(strData.StartsWith("0", StringComparison.OrdinalIgnoreCase))
{
intData = Convert.ToInt32(strData, 8);
}
Expand Down

0 comments on commit b0d86e1

Please sign in to comment.