Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!texbell!sugar!karl From: karl@sugar.hackercorp.com (Karl Lehenbauer) Newsgroups: comp.sys.amiga.tech Subject: Problem with assert.h in Manx 5.0, and a fix Message-ID: <5563@sugar.hackercorp.com> Date: 12 Apr 90 02:36:36 GMT Reply-To: karl@sugar.hackercorp.com.hackercorp.com (Karl Lehenbauer) Organization: Sugar Land Unix - Houston Lines: 19 There is a problem with the assert macro in assert.h in Manx 5.0. It cost me a bit of time to find, damn it, and I thought I'd save anyone else the hassle. The problem occurs when there is a compound expression in an assert, as in: assert(!Playing || (next_event_ticks != BIG_NUMBER)); Only the second half of the assert is actually checked. In the file, the macro is defined (I only show a bit of it here for to avoid possible copyright problems) #define assert(x) (x == 0) ? ... It needs to be changed to: #define assert(x) ((x) == 0) ? ... -- -- uunet!sugar!karl "I hate quotations. Tell me what you know." -- Emerson -- Usenet access: (713) 438-5018