diff options
| author | 2025-10-13 22:19:45 +0200 | |
|---|---|---|
| committer | 2025-10-13 22:19:45 +0200 | |
| commit | 5d80393ef42713ab3ca9f6449a6e3b2dde727f34 (patch) | |
| tree | 631282eb1ff4c1d6af5d9553cb189fe92c918989 | |
| parent | 5fe155a88907cf09e316f6eb6df2c781e49c6e74 (diff) | |
arithmetic type cvt errata
| -rw-r--r-- | type.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -304,11 +304,11 @@ cvtarith(union type a, union type b) if (issigned(a)) { if (targ_primsizes[a.t] <= targ_primsizes[b.t]) a.t += 1; /* make unsigned */ - return a; + return a.t > b.t ? a : b; } else { if (targ_primsizes[b.t] <= targ_primsizes[a.t]) b.t += 1; /* make unsigned */ - return b; + return b.t > a.t ? b : a; } } |