Cacodemon
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Eternity > Bug found in pvsnfmt_int
 
Author
All times are GMT. The time now is 07:51. Post New Thread    Post A Reply
Anders
No one knows I'm schepe


Posts: 428
Registered: 03-02


Hi Quasar, i didn't know where to post this, since you left the channel about 3 minutes before i found it.

code:
for (; len > 0; len--) { char n = POP(); if (n <= 9) { **pinsertion = n + '0'; *pinsertion += 1; } else { **pinsertion = n - 10 + char10; *pinsertion += 1; } } *nmax -= len;


the author seems to have forgotten that len will be 0 after the for loop is done, so *nmax (which contains the number of characters left in the buffer) is never decreased. the easy fix is to use a temp variable for the for loop.

__________________
++++++++++[>++++++++++>++++++++++++>+++++++++++>++
+>+<<<<<-]>.>-.>>++.<<<++.>>+.+++.<--.>-----.+++++
+.>.<<<-----.>>-.<<++++.>>>.<<<++.------.>++++.>>>.

Old Post 07-19-03 03:44 #
Anders is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 07:51. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Eternity > Bug found in pvsnfmt_int

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.