From 14413c472460d6fadfeec98c00ca6d4c96817dc4 Mon Sep 17 00:00:00 2001 From: DarkSER Date: Tue, 6 Aug 2013 22:06:17 +0200 Subject: [PATCH 1/2] fixed print_statuschange & m_set_userstatus usage in nTox_win32.c --- testing/nTox_win32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/nTox_win32.c b/testing/nTox_win32.c index dbbd0f6e..2e6451f3 100644 --- a/testing/nTox_win32.c +++ b/testing/nTox_win32.c @@ -86,7 +86,7 @@ void print_nickchange(int friendnumber, uint8_t *string, uint16_t length) printf(msg); } -void print_statuschange(int friendnumber, USERSTATUS_KIND kind, uint8_t *string, uint16_t length) +void print_statuschange(int friendnumber, uint8_t *string, uint16_t length) { char name[MAX_NAME_LENGTH]; getname(friendnumber, (uint8_t*)name); @@ -275,7 +275,7 @@ void change_status(int savetofile) } status[i-3] = 0; - m_set_userstatus(status, strlen((char*)status)); + m_set_userstatus(m_get_userstatus_kind(0), status, strlen((char*)status)); char numstring[100]; sprintf(numstring, "\n[i] changed status to %s\n\n", (char*)status); printf(numstring); @@ -407,7 +407,7 @@ int main(int argc, char *argv[]) while (fgets(line, MAX_USERSTATUS_LENGTH, status_file) != NULL) { sscanf(line, "%s", (char*)status); } - m_set_userstatus(status, strlen((char*)status)+1); + m_set_userstatus(m_get_userstatus_kind(0), status, strlen((char*)status)+1); statusloaded = 1; printf("%s\n", status); fclose(status_file); From defabe8e0a7d501425149a8deca1ed95cf7ef032 Mon Sep 17 00:00:00 2001 From: Sergej Date: Wed, 7 Aug 2013 09:43:05 +0200 Subject: [PATCH 2/2] set USERSTATUS_KIND_RETAIN as default --- testing/nTox_win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/nTox_win32.c b/testing/nTox_win32.c index 2e6451f3..007305ad 100644 --- a/testing/nTox_win32.c +++ b/testing/nTox_win32.c @@ -275,7 +275,7 @@ void change_status(int savetofile) } status[i-3] = 0; - m_set_userstatus(m_get_userstatus_kind(0), status, strlen((char*)status)); + m_set_userstatus(USERSTATUS_KIND_RETAIN, status, strlen((char*)status)); char numstring[100]; sprintf(numstring, "\n[i] changed status to %s\n\n", (char*)status); printf(numstring); @@ -407,7 +407,7 @@ int main(int argc, char *argv[]) while (fgets(line, MAX_USERSTATUS_LENGTH, status_file) != NULL) { sscanf(line, "%s", (char*)status); } - m_set_userstatus(m_get_userstatus_kind(0), status, strlen((char*)status)+1); + m_set_userstatus(USERSTATUS_KIND_RETAIN, status, strlen((char*)status)+1); statusloaded = 1; printf("%s\n", status); fclose(status_file);