diff --git a/neo/SmartContract/InteropService.cs b/neo/SmartContract/InteropService.cs index 8651dfbc3d..6868da1886 100644 --- a/neo/SmartContract/InteropService.cs +++ b/neo/SmartContract/InteropService.cs @@ -238,13 +238,13 @@ private static bool Runtime_GetNotifications(ApplicationEngine engine) { var data = engine.CurrentContext.EvaluationStack.Pop().GetByteArray(); if (data.Length != UInt160.Length) return false; - if (!engine.CheckArraySize(engine.Notifications.Count)) return false; var hash = new UInt160(data); IEnumerable notifications = engine.Notifications; if (!hash.Equals(UInt160.Zero)) notifications = notifications.Where(p => p.ScriptHash == hash); + if (!engine.CheckArraySize(notifications.Count())) return false; engine.CurrentContext.EvaluationStack.Push(notifications.Select(u => new VM.Types.Array(new StackItem[] { u.ScriptHash.ToArray(), u.State })).ToArray()); return true; }