Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug for low memory when file has odd number of bytes #82

Merged
merged 1 commit into from Oct 27, 2017
Merged

Fix bug for low memory when file has odd number of bytes #82

merged 1 commit into from Oct 27, 2017

Conversation

HotKeyIt
Copy link
Contributor

No description provided.

@Lexikos
Copy link
Collaborator

Lexikos commented Sep 29, 2017

What "bug for low memory"?

I see one case where the extra byte is needed, but I would not have described it that way. Merely having an odd number of bytes is not enough for the function to fail. Before I merge this, please elaborate.

@HotKeyIt
Copy link
Contributor Author

HotKeyIt commented Sep 30, 2017

Try running this code in debug mode:
FileDelete("C:\Temp\temptestfile.txt"),w:=FileOpen("C:\Temp\temptestfile.txt","w"),VarSetCapacity(var,1),w.RawWrite(&var,1),w.Close()
f:=FileRead("C:\Temp\temptestfile.txt","RAW")

@Lexikos Lexikos merged commit 076df6f into AutoHotkey:alpha Oct 27, 2017
Lexikos added a commit that referenced this pull request Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants