LWN.net Logo

Correction and comment replies

Correction and comment replies

Posted Apr 5, 2008 20:42 UTC (Sat) by pr1268 (subscriber, #24648)
In reply to: What If I Don't Actually Like My Users? by pr1268
Parent article: What If I Don't Actually Like My Users?

s/h_list/stuff/ on line 3 of my code.

In reply to man_ls, as others have pointed out, a size_t is an unsigned long integer type. Integer underflow occurred here with the pre-decrement --i array index.

In reply to emk, I did indeed changing over to using a reverse iterator for this code, but I originally had some motivation not to do so, the reason which now escapes me. And to think this was just two days ago - goes to show just how fast thoughts and ideas flee through my mind when writing software!

Thanks for the replies - it's not just anywhere where I can share such embarrassing C++ code and still stimulate a nice discussion.


(Log in to post comments)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds