I'm using gdb, how do I get rid of these random values?
@wio
It looks like your pointer is pointing at an address that is before the actual beginning of the string.
so what would i pass in gdb?
I think the problem fundamentally is the pointer but...
i can't change the original file they said. :/
try using `(&puzzle + 20)` and see what you get
`(&puzzle1+20)`
adress out of bounds
can you give a picture
when i do &puzzle1+5, i get "is watching you"
What about +4?
+3 did the trick.
ok ok, cause it was 8 bytes from T to i. ok ok. thank you! nice hint!
I guess the type of puzzle1 isn't a char, because the pointer arithmetic is moving it far.
it looks like it's a type that takes 4 bytes.
32 bit, could be an integer or something
Alternatively, you could have done something like `(((char*) &puzzle1)+12)`.
Join our real-time social learning platform and learn together with your friends!