QUOTE(lordvader129 @ Mar 14 2008, 02:04 PM)

im not too good with programming, but that seems to be saying "if the cluster size is 64 then change it to 128" which is what it did for me when i formatted,
Yes, that's exactly what the code is saying... But that code is only supposed to be executed when you hit the Y button... Not when you actually do the format.
Plus 256kb clusters are supposed to change to 1kb next... You found they came out as 32kb after the format, so something's odd there too.
QUOTE(lordvader129 @ Mar 14 2008, 02:04 PM)

i wouldnt know how to make it right though, i dont recognize what nghtshd is doing in the original code:
QUOTE
g_iClusterSize = g_iClusterSize == 16 ? 32 : 16;
This handy little function (or statement, whatever it's called) lets you return a value based on a condition:
<condition>?<if condition is true return this>:<if condition is false return this>So the original line follows this logic:
Let "g_iClusterSize" equal (32 if "g_iClusterSize" equals 16) or (16 if "g_iClusterSize" does not equal 16).
Makes a little more sense if I take the original line and stick brackets in it:
g_iClusterSize = ( (g_iClusterSize == 16) ? (32) : (16) );
I expanded it out into separate "if" statements to keep it readable with all the extra cluster settings.
The code in concern is extremely simple, so I just don't see the room for error. When XBPartitioner goes to do the actual format it multiplies the cluster size by 1024 to get the size in bytes, and passes that to the formatter... I was thinking there might've been an overflow there (32kb is the highest byte count you can stick in two bytes), but if that was the case you shouldn't have managed to get 128kb clusters...
And for all I know the "int" type is more then two bytes anyway. It wasn't back in the day, but that was back in the day...
But hey, whatever, I can't think of anything else to try, so:
QUOTE("Line 66")
int g_iClusterSize = 16;
Change it to this:
QUOTE("Line 66")
ULONG g_iClusterSize = 16;