Modify logic for "and" and "or" operator and in_area function. Add null marshaling for input proxy.
This commit is contained in:
@@ -87,8 +87,8 @@ namespace Cryville.Crtr {
|
||||
static readonly int _colop_and = IdentifierManager.SharedInstance.Request("&");
|
||||
static readonly int _colop_or = IdentifierManager.SharedInstance.Request("|");
|
||||
protected override bool Collapse(int name, PdtVariableMemory param) {
|
||||
if (name == _colop_and) return param.AsNumber() == 0;
|
||||
else if(name == _colop_or) return param.AsNumber() != 0;
|
||||
if (name == _colop_and) return param.AsNumber() <= 0;
|
||||
else if (name == _colop_or) return param.AsNumber() > 0;
|
||||
else throw new KeyNotFoundException(string.Format("Undefined collapse operator {0}", name));
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ namespace Cryville.Crtr {
|
||||
if (arg.Type == PdtInternalType.Error) {
|
||||
throw new InvalidOperationException("Error");
|
||||
}
|
||||
else if (arg.Type == PdtInternalType.Number && arg.AsNumber() >= 0) {
|
||||
else if (arg.Type == PdtInternalType.Number && arg.AsNumber() <= 0) {
|
||||
GetReturnFrame(PdtInternalType.Null, 0);
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user