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

Does it copy/return 4 bytes from 2 byte word ? #13

Open
DJLinux opened this issue Nov 21, 2021 · 0 comments
Open

Does it copy/return 4 bytes from 2 byte word ? #13

DJLinux opened this issue Nov 21, 2021 · 0 comments

Comments

@DJLinux
Copy link

DJLinux commented Nov 21, 2021

DARKSDK DWORD CastFtoW(float fValue)  {
  WORD result = (WORD)fValue;
  return *((DWORD*)&result);
}

I mean if you cast a pointer of 2 byte value to pointer of 4 byte value return *((DWORD*)&result); will read two more bytes !

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

No branches or pull requests

1 participant