Hacking Fix for incorrect estimated size

AlexDP

Well-Known Member
OP
Member
Joined
Jun 17, 2007
Messages
133
Trophies
0
XP
53
Country
Italy
My apologies for creating a separate thread for this after I already posted it in the WBFS Manager 2.5 thread, but I wanted to make sure the other devs pick up on this.
I seem to remember a user on this forum pointing this out a while back, but he reported having tested it and it not fixing the bug so I didn't follow up on it at the time...
After a quick debug session I've come across the same issue, fixed it and now seem to be getting correct sizes, so I thought I'd give developers of other WBFS apps a heads up in case their apps have the same estimated size bug (since it's in libwbfs).
I've fixed this in WBFS Manager 2.5 (if you downloaded it prior to my initial post about the issue and have this problem, redownload it as I've replaced the file on CodePlex with the fixed one).

So, to the point now.
in libwbfs.c
in wbfs_estimate_disc:
return tot * ((p->wbfs_sec_sz / p->hd_sec_sz) * 512);
//it should be
//return tot * (((p->wbfs_sec_sz*1.0) / p->hd_sec_sz) * 512);
//and you should be returning a float, so fix the method's signature in libwbfs.c and libwbfs.h and make sure your retrieving the value as a float in your own (calling) code.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://m.youtube.com/watch?v=_NTF5_qgH0o