Fix exception handling for PDT operator.

This commit is contained in:
2022-10-31 13:47:10 +08:00
parent 92a49294f7
commit d85553a93b
2 changed files with 4 additions and 2 deletions

View File

@@ -363,6 +363,8 @@ namespace Cryville.Crtr {
}
unsafe static class oputil {
public static float AsNumber(PropSrc src) {
if (src == null)
throw new ArgumentNullException("src");
int type; byte[] value;
src.Get(out type, out value);
if (type != PdtInternalType.Number)