Skip to content

Commit

Permalink
fix EvilBeaver#1405 для v2: значение для пропущенного параметра +рефа…
Browse files Browse the repository at this point in the history
…кторинг
  • Loading branch information
Mr-Rm committed Jun 3, 2024
1 parent a47b0ab commit 8556c9d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/ScriptEngine/Machine/Contexts/COMWrapperContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,14 @@ protected static (object[] values, ParameterModifier[] flags) MarshalArguments(I
public static object MarshalIValue(IValue val)
{
object retValue;
if (val != null && val is BslDateValue dateVal)
if (val is BslDateValue dateVal)
{
var date = (DateTime)dateVal;
if (date <= MIN_OLE_DATE)
{
retValue = MIN_OLE_DATE;
}
else
{
retValue = date;
}
retValue = date < MIN_OLE_DATE ? MIN_OLE_DATE : date;
}
else
{
retValue = ContextValuesMarshaller.ConvertToClrObject(val);
retValue = ContextValuesMarshaller.ConvertToClrObject(val) ?? Missing.Value;;
}

return retValue;
Expand Down

0 comments on commit 8556c9d

Please sign in to comment.