From e61cd97403e28c234a12d5dcf60cd9924f01470c Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 1 Apr 2007 17:30:05 +0000 Subject: [PATCH] Fix var types in remote --- remote.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/remote.cc b/remote.cc index bdaa52f..e1abbfc 100644 --- a/remote.cc +++ b/remote.cc @@ -169,7 +169,7 @@ void Remote::LoadKeysConfig(char *cfg) { ULONG ul1, ul2; ULONG uc; - if (sscanf(start,"%XI%XK%X",&ul1,&ul2,&uc) == 3) + if (sscanf(start,"%lXI%lXK%lX",&ul1,&ul2,&uc) == 3) { translist[((ULLONG) ul1) | ((ULLONG)ul2) << 32]=(UCHAR)uc; } @@ -182,11 +182,10 @@ char *Remote::SaveKeysConfig() int length=21*translist.size() +1; char *output=new char[length]; char *current=output; - int pos=0; RemoteTranslationList::const_iterator it; for (it = translist.begin(); it != translist.end(); it++) { - current+=sprintf(current,"H%08XI%08XK%02X", + current+=sprintf(current,"H%08lXI%08lXK%02X", (ULONG)it->first ,(ULONG) (it->first >> 32), it->second); } return output; @@ -357,7 +356,7 @@ char* Remote::HCWDesc(ULLONG hcw) else { dest=new char[20]; - sprintf(dest,"C:%X",(ULONG)hcw); + sprintf(dest,"C:%lX",(ULONG)hcw); } return dest; } -- 2.39.2