Commit ba6e7588 authored by Kurt Hindenburg's avatar Kurt Hindenburg

fix 2 issues of macro argument should be enclosed in parentheses

parent 89d6d2d2
......@@ -739,7 +739,7 @@ void Session::sendSignal(int signal)
void Session::reportBackgroundColor(const QColor& c)
{
#define to65k(a) (QString("%1").arg((int)(a*0xFFFF), 4, 16, QChar('0')))
#define to65k(a) (QString("%1").arg((int)((a)*0xFFFF), 4, 16, QChar('0')))
QString msg = "\033]11;rgb:"
+ to65k(c.redF()) + '/'
+ to65k(c.greenF()) + '/'
......
......@@ -165,7 +165,7 @@ void Vt102Emulation::reset()
*/
#define TY_CONSTRUCT(T,A,N) ( ((((int)N) & 0xffff) << 16) | ((((int)A) & 0xff) << 8) | (((int)T) & 0xff) )
#define TY_CONSTRUCT(T,A,N) ( ((((int)(N)) & 0xffff) << 16) | ((((int)(A)) & 0xff) << 8) | (((int)(T)) & 0xff) )
#define TY_CHR( ) TY_CONSTRUCT(0,0,0)
#define TY_CTL(A ) TY_CONSTRUCT(1,A,0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment