Why does making a seemingly insignificant edit to an executable's machine code return errors?
When you open an executable in a text editor then the editor reads the contents in some lossy way - even if you haven't changed anything then the file would be different. Binary files contain non-printable characters (those with ASCII codes from 0 to 31), and these could be deleted by the text editor (other than CR/LF), especially the 0 character. Also, Windows text editors would convert CR (the UNIX new line convention; 0D) to CR/LF (the Windows convention; 0D 0A).

If you're curious what went wrong in your case, try to compare the files byte by byte and see where the differ. You could use a "hex editor", which is what you should have used to modify your file in the first place. These editors don't mishandle your files.