X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Ffteqcc-bugs.qc;h=dd4fd45f3c6c474df9403afa5e06319fa2ead225;hb=7bcbac3942f6eb97a9c394ade1363effc2d52828;hp=e426e93f932f1cce4a59af1e5ccf84ed7df7d5cf;hpb=8ec332c7d3cffdc6b39c3ada385fa41995630589;p=xonotic%2Fxonotic-data.pk3dir.git 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)); +}