diff options
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/common.h b/src/core/common.h index 9b5c2369..48b20884 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -106,7 +106,7 @@ typedef uint16_t wchar; inline uint32 dpb(uint32 b, uint32 p, uint32 s, uint32 w) { uint32 m = MASK(p,s); - return w & ~m | b<<p & m; + return (w & ~m) | ((b<<p) & m); } inline uint32 ldb(uint32 p, uint32 s, uint32 w) { @@ -219,6 +219,8 @@ public: extern int strcasecmp(const char *str1, const char *str2); #endif +extern wchar *AllocUnicode(const char*src); + #define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v)) inline float sq(float x) { return x*x; } @@ -444,4 +446,4 @@ inline T *WriteSaveBuf(uint8 *&buf, const T &value) assert(ReadSaveBuf<uint32>(buf) == size); -void cprintf(char*, ...);
\ No newline at end of file +void cprintf(char*, ...); |