3 ms·
The problem is that `buf+len` is still a `char*`. So it could still trigger undefined behaviour before it is converted to `uintPtr_t`. The real solution is to h
by loup-vaillant 17y ago
The problem is that `buf+len` is still a `char*`. So it could still trigger undefined behaviour before it is converted to `uintPtr_t`. The real solution is to have `buf` declared as a `unitPtr_t` in the first place. Ugly, but standard.
- ssp 17y agoNo, (uintptr_t)buf + len is parenthesized like this: ((uintptr_t)buf) + len.
- loup-vaillant 17y agoWhoops, my mistake. Forget what I said.