File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -870,7 +870,14 @@ class function TBuiltInFunction.SEBufferCreate(const VM: TSEVM; const Args: arra
870
870
871
871
class function TBuiltInFunction.SEBufferLength (const VM: TSEVM; const Args: array of TSEValue): TSEValue;
872
872
begin
873
- Result := SESize(Args[0 ]);
873
+ case Args[0 ].Kind of
874
+ sevkBuffer:
875
+ begin
876
+ Result := Length(Args[0 ].VarBuffer^.Base);
877
+ end ;
878
+ else
879
+ Result := 0 ;
880
+ end ;
874
881
end ;
875
882
876
883
class function TBuiltInFunction.SEBufferGetU8 (const VM: TSEVM; const Args: array of TSEValue): TSEValue;
@@ -5351,7 +5358,7 @@ procedure TScriptEngine.Parse;
5351
5358
end ;
5352
5359
end ;
5353
5360
else
5354
- Error(Format(' Unknown identify "%s"' , [Token.Value ]), Token);
5361
+ Error(Format(' Unknown identifier "%s"' , [Token.Value ]), Token);
5355
5362
end ;
5356
5363
end ;
5357
5364
end ;
You can’t perform that action at this time.
0 commit comments