Fix for #830 supplied by UvB
This commit is contained in:
committed by
Oliver Schmidt
parent
14d8f3d81d
commit
37f80534c9
13
test/val/bug830.c
Normal file
13
test/val/bug830.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "unittest.h"
|
||||
|
||||
char test[1];
|
||||
char *dst = &test[0];
|
||||
|
||||
TEST
|
||||
{
|
||||
char src = 0;
|
||||
*dst = (src == 0) ? 42 : src;
|
||||
|
||||
ASSERT_AreEqual(42, *dst, "%u", "Incorrect ternary expression evaluation!");
|
||||
}
|
||||
ENDTEST
|
||||
Reference in New Issue
Block a user