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

Fixes a bug in the toHsStringMU8. #46

Open
wants to merge 1 commit into
base: ghc-8.0
Choose a base branch
from
Open

Fixes a bug in the toHsStringMU8. #46

wants to merge 1 commit into from

Conversation

dalaing
Copy link

@dalaing dalaing commented Jul 24, 2018

The variable i wasn't being declared / initialized before the while loop.

src/string.js Outdated
@@ -600,7 +600,7 @@ function h$toHsStringMU8(arr, cc) {
#else
function h$toHsStringMU8(arr) {
#endif
var accept = false, b, n = 0, cp = 0, r = HS_NIL;
var i = 0, accept = false, b, n = 0, cp = 0, r = HS_NIL;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure you meant:

var i = arr.length - 1;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, whoops - fixing that now.

@dalaing
Copy link
Author

dalaing commented Jul 25, 2018

I've finally bootstrapped ghcjs and everything else I was using and have tried this change out with the code that was causing an error, and it seems to be working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants