summaryrefslogtreecommitdiff
path: root/plugins/HistorySweeperLight
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistorySweeperLight')
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
index 028e92a757..71017f9817 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
@@ -98,15 +98,15 @@ static void GetBookmarks(MCONTACT hContact, BEventData** books, size_t* bookcnt)
DBVARIANT dbv;
if (db_get(hContact, "HistoryPlusPlus", "Bookmarks", &dbv) == 0) {
- if (dbv.cpbVal > 2 && *(WORD*)dbv.pbVal >= sizeof(BEventData)) {
- size_t recSize = *(WORD*)dbv.pbVal;
- size_t numb = (dbv.cpbVal - sizeof(WORD)) / recSize;
+ if (dbv.cpbVal > 2 && *(uint16_t*)dbv.pbVal >= sizeof(BEventData)) {
+ size_t recSize = *(uint16_t*)dbv.pbVal;
+ size_t numb = (dbv.cpbVal - sizeof(uint16_t)) / recSize;
BEventData* tbooks = (BEventData*)mir_alloc(sizeof(BEventData)*numb);
size_t tbookcnt = 0;
size_t i;
- uint8_t* evs = dbv.pbVal + sizeof(WORD);
+ uint8_t* evs = dbv.pbVal + sizeof(uint16_t);
for (i = 0; i < numb; ++i) {
tbooks[tbookcnt++] = *(BEventData*)evs;