2
0
Эх сурвалжийг харах

Merge pull request #35 from davecamp/master

prevent segfault with derefencing pointers to pointers that point to null
Brucey 9 жил өмнө
parent
commit
c393e7aa7e

+ 5 - 0
appstub.mod/debugger_mt.stdio.bmx

@@ -429,6 +429,11 @@ Function DebugDerefPointer$(decl:Int Ptr, pointer:Int Ptr)
 ?
 	Next
 
+	' make sure the final pointer is not null
+	If pointer = 0 
+		Return " {-}"
+	EndIf
+
 	Local value:String
 	Select datatype
 	Case "Byte"