Skip to content

Conversation

@11Lee1
Copy link

@11Lee1 11Lee1 commented Jun 2, 2019

here

@SwadicalRag
Copy link
Member

just reading over the code, i think it'll work, but why use c++ eldritch pointer arithmetic instead of just casting it to a GarrysMod::Lua::UserData and modifying the struct fields?

@11Lee1
Copy link
Author

11Lee1 commented Jun 4, 2019

yeah definitely better to just use that, would help with readability.

https://pastebin.com/0AGB4U0H

@SwadicalRag
Copy link
Member

SwadicalRag commented Jun 4, 2019

what's going on in this line?

*(unsigned int*)udata->data = (unsigned int)udata->data + 8;

it seems like a no-op since udata->data is later overwritten before a read.

@11Lee1
Copy link
Author

11Lee1 commented Jun 29, 2019

no idea to be completely honest, it's just what I interpreted the disassembly as. if you'd like you could always just call the PushVector function that's on the LuaInterfaces's vmt like so https://pastebin.com/MVzBkVnh or update the class

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