Skip to content

fix: nil pointer dereference fix #132#135

Closed
denysvitali wants to merge 1 commit intofiorix:masterfrom
denysvitali:master
Closed

fix: nil pointer dereference fix #132#135
denysvitali wants to merge 1 commit intofiorix:masterfrom
denysvitali:master

Conversation

@denysvitali
Copy link
Contributor

This PR should hopefully fix the bug introduced in the previous commit.

I've added the two use cases and now the tests are passing. This should hopefully be the definitive fix for making #132 work and #131

@@ -1369,24 +1369,26 @@ func (ge *goEncoder) genGoOpStruct(w io.Writer, d *wsdl.Definitions, bo *wsdl.Bi
name := goSymbol(bo.Name)
function := ge.funcs[name]
Copy link

Choose a reason for hiding this comment

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

function := ge.funcs[name] should be function := ge.funcs[bo.Name] and the whole issue is fixed.
No other changes are required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this fix doesn't seem to work with other wsdls, unfortunately :(

@denysvitali denysvitali closed this Aug 1, 2020
@denysvitali
Copy link
Contributor Author

I've created another PR (#137) since this one wasn't working properly for all the test cases and was polluting the stdout.

The fix should now work. Replacing goSymbol(bo.Name) is not enough: please check the PR to see my solution.

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