Skip to content

Commit

Permalink
add check: skeyValue.Value is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Luchuan committed Mar 12, 2020
1 parent 2b1939e commit d683efd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/neo/SmartContract/InteropService.Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static long GetStoragePrice(EvaluationStack stack, StoreView snapshot)
Key = key.GetSpan().ToArray()
};
var skeyValue = snapshot.Storages.TryGet(skey);
if (skeyValue is null)
if (skeyValue is null || skeyValue.Value is null)
newDataSize += key.GetByteLength();
else if (newDataSize <= skeyValue.Value.Length)
newDataSize = 1;
Expand Down

0 comments on commit d683efd

Please sign in to comment.