Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / src / mc / inspect / DwarfExpression.hpp
index ab229de..fd9be9f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -100,7 +100,8 @@ public:
   {
     if (size_ == stack_.size())
       throw evaluation_error("DWARF stack overflow");
-    stack_[size_++] = value;
+    stack_[size_] = value;
+    size_++;
   }
 
   /* Pop a value from the top of the stack */
@@ -108,7 +109,8 @@ public:
   {
     if (size_ == 0)
       throw evaluation_error("DWARF stack underflow");
-    return stack_[--size_];
+    --size_;
+    return stack_[size_];
   }
 
   // These are DWARF operations (DW_OP_foo):