Skip to content

Fixes a bug in the toHsStringMU8.#46

Open
dalaing wants to merge 1 commit intoghcjs:ghc-8.0from
dalaing:toHSStringMU8
Open

Fixes a bug in the toHsStringMU8.#46
dalaing wants to merge 1 commit intoghcjs:ghc-8.0from
dalaing:toHSStringMU8

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
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