From 5783208d9d589f2c7b8aef8b1e8f216fe4815475 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 15 Feb 2005 18:07:06 +0000 Subject: [PATCH] Fix a "signededness" error. --- src/FDM/ExternalPipe/ExternalPipe.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/FDM/ExternalPipe/ExternalPipe.cxx b/src/FDM/ExternalPipe/ExternalPipe.cxx index fa8a409f1..d03a0fa1a 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.cxx +++ b/src/FDM/ExternalPipe/ExternalPipe.cxx @@ -116,8 +116,10 @@ static int write_fifo( char cmd_type, int pd, char *cmd, int len ) { char *buf = new char[len + 3]; // write 2 byte command length + command type + command - char hi = (len + 1) / 256; - char lo = (len + 1) - (hi * 256); + unsigned char hi = (len + 1) / 256; + unsigned char lo = (len + 1) - (hi * 256); + + // cout << "len = " << len << " hi = " << (int)hi << " lo = " << (int)lo << endl; buf[0] = hi; buf[1] = lo;