]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/fteqcc-bugs.qc
Remove some old fteqcc legacy bug checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / fteqcc-bugs.qc
1 void error(...) = #1;
2 float id(float x) { return x; }
3
4 void Oassignments(float foo) // pass 1
5 {
6         float bar;
7         bar = 2;
8         bar = (foo ? 0 : (foo & 1));
9         if(bar == 2)
10                 error("FTEQCC SUCKS");
11 }
12
13 void Oreturn_only(float foo) // pass 0
14 {
15         if(foo)
16         {
17                 return;
18         }
19 }
20
21 void Oreturn_only_trap(void)
22 {
23         error("FTEQCC SUCKS");
24 }
25
26 .float fld;
27 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.
28 {
29                 ((e).fld |= id(wep - 1));
30 }