diff options
-rw-r--r-- | debug/DebugInformation.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml index e3f5d98e..4eff6548 100644 --- a/debug/DebugInformation.ml +++ b/debug/DebugInformation.ml @@ -553,7 +553,10 @@ let close_scope atom s_id lbl = | a::rest -> a,rest | _ -> assert false (* We must have an opening scope *) end in - let new_r = ({last_r with end_addr = Some lbl;})::rest in + let new_r = if last_r.start_addr = Some lbl then + rest + else + ({last_r with end_addr = Some lbl;})::rest in Hashtbl.replace scope_ranges s_id new_r with Not_found -> () |