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

ud_translate_att: AT&T mnemonic size suffix logic seems suspect #131

Closed
qetchlijn opened this issue Jun 8, 2020 · 1 comment
Closed

Comments

@qetchlijn
Copy link

The function ud_translate_att in syn-att.c declares a local variable, size, and sets it to zero:

extern void 
ud_translate_att(struct ud *u)
{
  int size = 0;

A bit further down there's code conditional on size to append a size suffix to the mnemonic:

if (size == 8) {
  ud_asmprintf(u, "b");
} else if (size == 16) {
  ud_asmprintf(u, "w");
} else if (size == 64) {
  ud_asmprintf(u, "q");
}

However, size is never changed from its initial value of zero, so the suffix is never added.

Should there be some additional logic to change the value of size in cases where a size suffix is required?

@qetchlijn
Copy link
Author

I'm closing this as it duplicates a problem noted in issue #113.

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