diff options
| author | Quentin Carbonneaux <quentin@c9x.me> | 2019-05-14 18:43:39 +0200 |
|---|---|---|
| committer | Quentin Carbonneaux <quentin@c9x.me> | 2019-05-14 18:43:39 +0200 |
| commit | 1b1a7f618ce9fc6b455e3c30213a8ec8feaab1dc (patch) | |
| tree | 30bd9c988d46ea76067789dfb941ab14c7bd1a68 | |
| parent | 61309852742548b496d222cf4e3f2c5e1569e6dd (diff) | |
| download | roux-1b1a7f618ce9fc6b455e3c30213a8ec8feaab1dc.tar.gz | |
fix a bad bug in copy detection
The code used to see add 0, 10 as
a copy of 0.
| -rw-r--r-- | copy.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -27,11 +27,11 @@ iscopy(Ins *i, Ref r, Fn *fn) case Ocopy: return 1; case Omul: - return iscon(i->arg[0], 1, fn) || iscon(i->arg[1], 1, fn); + return iscon(i->arg[1], 1, fn); case Odiv: return iscon(i->arg[1], 1, fn); case Oadd: - return iscon(i->arg[0], 0, fn) || iscon(i->arg[1], 0, fn); + return iscon(i->arg[1], 0, fn); default: break; } |
