Hacker News new | ask | show | jobs
by kevin_thibedeau 201 days ago
idx should be a size_t.
1 comments

Actually, there are historical reasons why `int` may be used. Look at the definition of the %n format specifier - it expects an `int *` argument. And all of the famirly functions return `int`'s ... see also:

https://stackoverflow.com/q/45740276/1593077