The Unarchiver (1000)

264 Name: Anonymous : 2007-03-02 21:26 ID:Mbbw6qgF [Del]

>>263

In that case, this should work (haven't tried compiling yet though!):
char nullChar = '\0';
NSMutableData *pwdData = [NSMutableData dataWithData:[password dataUsingEncoding:encoding]];
[pwdData appendBytes:&nullChar length:sizeof(char)];
return [pwdData bytes];

There will still be problems if the password string's encoding contains any nulls (like Unicode), but I don't think that's going to be a common case, and xadFileUnArc can't handle such encodings anyway.

This thread has been closed. You cannot post in this thread any longer.