From: Graue <gr...@oc...> - 2007-01-22 22:35:19
|
Sebastian wrote: > Negative array indexes are not defined in C so you could get really > random behaviour and it will break at least on amd64 in 64bit mode and > give you a segfault (if you want an explanation why just ask). You must be confused. Array indexing in C is just syntactic sugar for pointer arithmetic: "p[n]" means "*(p + n)", so a negative array index like "p[-1]" means "*(p - 1)", which is fine. Regards, Graue |