njames93 / GTA-V-Script-Decompiler

A Program that will decompile the script resources (xsc,csc,ysc) files from the X360, PS3 and PC versions of Grand Theft Auto V
101 stars 84 forks source link

Disposes all streams #4

Open Tustin opened 7 years ago

Tustin commented 7 years ago

I made it so all the loadfile and savefile methods have their streams wrapped in using blocks so it will auto dispose and close all streams when finished. There was a bug with one of the loadfiles (I think for nativeinfo.dat) which would cause a crash when trying to create another stream on the same file for saving because loadfile wasn't closed properly.

Also sorry for the whole file being "edited", that was due to the original formatting and my bad habit of ctrl E + D 😛