So when I'm sending and receiving files, a character "9" is placed somewhere in the resulting file, exactly once, almost every time. But it's completely random.
If this is my receival loop, how could this be possible?
EDIT 3: *removed code*
Computers can't just do stuff because they feel like it. But this is so strange, because it's exactly once, always the character 9. I should also note that this isn't a case of the character being wrong - it's actually missing a character at the end of the file because the 9 inserted itself and messed with the file length.
I know you may not be a Ruby expert Xi, but any input would be much appreciated.
EDIT: It appears to attach itself to the beginning and end of some messages, but I've never even written the character "9" in my server file once. Where the hell is it coming from?
EDIT 2: Comparing the server outgoing and the client ingoing, there is the 9 only on the client inbound. Perhaps there's some shoddy Win32API work in the RMXP implementation?
EDIT 3: It's because of the buffer character I was using. I thought \029 was a single character, but it's not. I'm not sure why I thought it was. (THERES NO 9 IN OCTAL, DUH)