Skip to content

Commit

Permalink
Add a debug assert in DMProcState.PopDrop()
Browse files Browse the repository at this point in the history
  • Loading branch information
wixoaGit committed Mar 1, 2024
1 parent ccbbdc8 commit 511be53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions OpenDreamRuntime/Procs/DMProc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using OpenDreamRuntime.Procs.DebugAdapter;
using OpenDreamRuntime.Resources;
using OpenDreamShared.Dream;
using Robust.Shared.Utility;

namespace OpenDreamRuntime.Procs {
public sealed class DMProc : DreamProc {
Expand Down Expand Up @@ -554,6 +555,7 @@ public DreamValue Pop() {
}

public void PopDrop() {
DebugTools.Assert(_stackIndex > 0, "Attempted to PopDrop with a stack index of (or below?) 0");
_stackIndex -= 1;
}

Expand Down

0 comments on commit 511be53

Please sign in to comment.