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