2 ms·
I remember that blog post. And now I have this sudden recollection that an Original Nerdster I worked with found almost the same bug in an assembly language pro
by Gibbon1 8y ago
I remember that blog post. And now I have this sudden recollection that an Original Nerdster I worked with found almost the same bug in an assembly language program back in the 80's. Binary sort into a thermocouple look up table failed suddenly, inexplicably.
He added a feature and suddenly the temperature reading was just garbage. Taking the feature out fixed it. Nothing about the added code appeared to be capable of causing the problem.
Had him stumped till he started stepping through the binary search itself. The cause was adding the feature pushed the table location over the 32767 boundary. Bug was the code added two 16 bit pointers and did a right shift without carry.
d'oh!