From 2109d4b859bdb12d9be5c2e283983853745018ed Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 29 Apr 2012 20:59:46 +0200 Subject: [PATCH] document the new fteqcc bug --- qcsrc/fteqcc-bugs.qc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qcsrc/fteqcc-bugs.qc b/qcsrc/fteqcc-bugs.qc index e426e93f9..dd4fd45f3 100644 --- a/qcsrc/fteqcc-bugs.qc +++ b/qcsrc/fteqcc-bugs.qc @@ -1,4 +1,5 @@ void error(...) = #1; +float id(float x) { return x; } void Oassignments(float foo) // pass 1 { @@ -21,3 +22,9 @@ void Oreturn_only_trap(void) { error("FTEQCC SUCKS"); } + +.float fld; +void Ono_assignments(entity e, float wep) // pass an e with e.fld == 1, and wep == 3. e.fld will be 2 instead of 3. Observe the INDIRECT and the SUB use the same field for storage, wreaking havoc. +{ + ((e).fld |= id(wep - 1)); +} -- 2.39.2