Skip to content

Fixes a bug in the toHsStringMU8.#46

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

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

Conversation

@dalaing

@dalaing dalaing commented Jul 24, 2018

Copy link
Copy Markdown

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

Comment thread 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
Copy Markdown

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

dalaing commented Jul 25, 2018

Copy link
Copy Markdown
Author

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