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

Fix output metadata string for MResourceTypeForInfoType #25

Open
cpz opened this issue Dec 2, 2023 · 2 comments · Fixed by #31
Open

Fix output metadata string for MResourceTypeForInfoType #25

cpz opened this issue Dec 2, 2023 · 2 comments · Fixed by #31
Assignees
Labels
bug Something isn't working

Comments

@cpz
Copy link
Contributor

cpz commented Dec 2, 2023

E.g: https://github.com/neverlosecc/source2sdk/blob/dota/sdk/resourcesystem.hpp#L605
Related code: https://github.com/neverlosecc/source2gen/blob/main/src/sdk/sdk.cpp#L115

@cpz cpz added the bug Something isn't working label Dec 2, 2023
@cpz cpz self-assigned this Dec 2, 2023
@es3n1n
Copy link
Collaborator

es3n1n commented Jan 30, 2024

The main reason we are getting these "random" bytes is that the size of this value isn't always a 32/16-byte value. Instead, it could be only 8 bytes in length and its value could be fit without the null terminator.
image

And now the question I don't have the answer to(for now): Where should we get the reserved size instead? Probably the reversals of how this stuff gets allocated in heap could help us with answering this question.

cpz added a commit that referenced this issue Jan 31, 2024
1. Remove unused includes in schema
2. Schema.h was refactored to be in Valve C++ Guidelines (E.g member names)
3.  CSchemaType was reversed a little bit more
4. CSchemaClassBinding got IsA function which can use internatl schema function to deterime if current class is has inheritance from other SchemaType
5. Added SchemaBuiltinType_t
6. CShemaSystemTypeScope was a little bit reversed \ refactored
7. CSchemaSystem was a little bit reversed \ refactored
8. Minor changes in sdk gen
a. Use of std::ranges::find instead std::find
b. Fix #25 by clean_string gh3tt0 c0d3nz
@cpz cpz mentioned this issue Jan 31, 2024
Merged
@cpz cpz linked a pull request Jan 31, 2024 that will close this issue
Merged
es3n1n pushed a commit that referenced this issue Jan 31, 2024
1. Remove unused includes in schema
2. Schema.h was refactored to be in Valve C++ Guidelines (E.g member names)
3.  CSchemaType was reversed a little bit more
4. CSchemaClassBinding got IsA function which can use internatl schema function to deterime if current class is has inheritance from other SchemaType
5. Added SchemaBuiltinType_t
6. CShemaSystemTypeScope was a little bit reversed \ refactored
7. CSchemaSystem was a little bit reversed \ refactored
8. Minor changes in sdk gen
a. Use of std::ranges::find instead std::find
b. Fix #25 by clean_string gh3tt0 c0d3nz
@es3n1n
Copy link
Collaborator

es3n1n commented Jan 31, 2024

Reopening because this issue isn't fully resolved and we still have a bunch of inconsistent strings.

@es3n1n es3n1n reopened this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants