diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-08-13 18:27:21 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-08-13 18:27:21 +0000 |
commit | e84bf4a5995b26423129b9339dd387e2a7431a0a (patch) | |
tree | 56ba8122b2cf9c2b4f9727148ee03b79478a348a | |
parent | ea20be4475a06afea0da33b46ec5957f7b1ced99 (diff) |
data format fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@14943 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/AdvaImg/src/Metadata/TagConversion.cpp | 12 | ||||
-rw-r--r-- | plugins/CmdLine/src/utils.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 2 | ||||
-rw-r--r-- | plugins/Exchange/src/utils.cpp | 2 | ||||
-rw-r--r-- | plugins/WhenWasIt/src/utils.cpp | 2 | ||||
-rw-r--r-- | plugins/YahooGroups/src/utils.cpp | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/plugins/AdvaImg/src/Metadata/TagConversion.cpp b/plugins/AdvaImg/src/Metadata/TagConversion.cpp index f05818600c..bbba4442c2 100644 --- a/plugins/AdvaImg/src/Metadata/TagConversion.cpp +++ b/plugins/AdvaImg/src/Metadata/TagConversion.cpp @@ -199,10 +199,10 @@ ConvertAnyTag(FITAG *tag) { { UINT64 *pvalue = (UINT64 *)FreeImage_GetTagValue(tag); - sprintf(format, "%ld", pvalue[0]); + sprintf(format, "%lld", pvalue[0]); buffer += format; for(i = 1; i < tag_count; i++) { - sprintf(format, "%ld", pvalue[i]); + sprintf(format, "%lld", pvalue[i]); buffer += format; } break; @@ -212,10 +212,10 @@ ConvertAnyTag(FITAG *tag) { { UINT64 *pvalue = (UINT64 *)FreeImage_GetTagValue(tag); - sprintf(format, "%X", pvalue[0]); + sprintf(format, "%llX", pvalue[0]); buffer += format; for(i = 1; i < tag_count; i++) { - sprintf(format, "%X", pvalue[i]); + sprintf(format, "%llX", pvalue[i]); buffer += format; } break; @@ -225,10 +225,10 @@ ConvertAnyTag(FITAG *tag) { { INT64 *pvalue = (INT64 *)FreeImage_GetTagValue(tag); - sprintf(format, "%ld", pvalue[0]); + sprintf(format, "%lld", pvalue[0]); buffer += format; for(i = 1; i < tag_count; i++) { - sprintf(format, "%ld", pvalue[i]); + sprintf(format, "%lld", pvalue[i]); buffer += format; } break; diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp index 7e8520d06c..4631775c63 100644 --- a/plugins/CmdLine/src/utils.cpp +++ b/plugins/CmdLine/src/utils.cpp @@ -67,7 +67,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) buffer[4] = '\0'; //mark the end of the string
for (UINT i = 0; i < size; i++) {
strncpy_s(buffer + 2, 3, &tmp[i*2], _TRUNCATE);
- sscanf(buffer, "%x", &outData[i]);
+ sscanf(buffer, "%hhx", &outData[i]);
}
}
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index cfe09ffcb7..f543a32f28 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -76,7 +76,7 @@ void exportModule(MCONTACT hContact, const char *module, FILE *file) fprintf(file, "\n%s=d%s", setting->name, _ultoa(dbv.dVal, tmp, 10));
break;
case DBVT_BLOB:
- fprintf(file, "\n%s=n%s", setting->name, ptrA(StringFromBlob(dbv.pbVal, dbv.cpbVal)));
+ fprintf(file, "\n%s=n%s", setting->name, (char*)ptrA(StringFromBlob(dbv.pbVal, dbv.cpbVal)));
break;
case DBVT_WCHAR:
case DBVT_ASCIIZ:
diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp index 0919ac6651..32a7a79c01 100644 --- a/plugins/Exchange/src/utils.cpp +++ b/plugins/Exchange/src/utils.cpp @@ -104,7 +104,7 @@ void HexToBin(TCHAR *inData, ULONG &size, LPBYTE &outData) buffer[4] = '\0'; //mark the end of the string
for (UINT i = 0; i < size; i++) {
_tcsncpy(buffer + 2, &tmp[i * 2], 2);
- _stscanf(buffer, _T("%x"), &outData[i]);
+ _stscanf(buffer, _T("%hhx"), &outData[i]);
}
}
diff --git a/plugins/WhenWasIt/src/utils.cpp b/plugins/WhenWasIt/src/utils.cpp index 3bfa1843f2..245394f1ef 100644 --- a/plugins/WhenWasIt/src/utils.cpp +++ b/plugins/WhenWasIt/src/utils.cpp @@ -102,7 +102,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) buffer[4] = '\0'; //mark the end of the string
for (UINT i = 0; i < size; i++) {
strncpy(buffer + 2, &tmp[i * 2], 2);
- sscanf(buffer, "%x", &outData[i]);
+ sscanf(buffer, "%hhx", &outData[i]);
}
}
diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp index 60034353ce..8ffac76e0b 100644 --- a/plugins/YahooGroups/src/utils.cpp +++ b/plugins/YahooGroups/src/utils.cpp @@ -81,7 +81,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) for (i = 0; i < size; i++)
{
strncpy(buffer + 2, &tmp[i * 2], 2);
- sscanf(buffer, "%x", &outData[i]);
+ sscanf(buffer, "%hhx", &outData[i]);
}
i = size;
}
|