diff --git a/programs/cmm/TWB/links.h b/programs/cmm/TWB/links.h index 98d1a934f9..f1ea606695 100644 --- a/programs/cmm/TWB/links.h +++ b/programs/cmm/TWB/links.h @@ -113,10 +113,10 @@ void LinksArray::GetAbsoluteURL(dword in_URL){ IF (!strcmpn(in_URL,"./", 2)) in_URL+=2; strcpy(#newurl, BrowserHistory.CurrentUrl()); - if (ESBYTE[in_URL] == '/') + if (ESBYTE[in_URL] == '/') //remove everything after site domain name { i = strchr(#newurl+8, '/'); - if (i>0) newurl[i+7]=0; + if (i) ESBYTE[i]=0; in_URL+=1; } diff --git a/programs/cmm/lib/strings.h b/programs/cmm/lib/strings.h index 84bb0b3cb1..28edf41d75 100644 --- a/programs/cmm/lib/strings.h +++ b/programs/cmm/lib/strings.h @@ -400,7 +400,7 @@ inline fastcall void chrcat(ESI, BL) } -/*inline fastcall signed int strchr( ESI,BL) +inline fastcall signed int old_strchr( ESI,BL) { int jj=0; do{ @@ -409,7 +409,7 @@ inline fastcall void chrcat(ESI, BL) IF(AL==BL) return jj; } while(AL!=0); return 0; -}*/ +} inline dword strchr(dword shb;char s) { @@ -919,7 +919,6 @@ inline void debugi(dword d_int) } -//#define strncpy strcpyn #define strnmov strmovn #define stricmp strcmpi #define strcmpn strncmp diff --git a/programs/cmm/liza/liza.c b/programs/cmm/liza/liza.c index aac4552861..fb5d4d62d7 100644 --- a/programs/cmm/liza/liza.c +++ b/programs/cmm/liza/liza.c @@ -136,9 +136,9 @@ void OpenMailDat() { } else { - strcpy(#pass_b64, #read_data+strchr(#read_data, '\n')+1); + strcpy(#pass_b64, strchr(#read_data, '\n')); base64_decode stdcall (#pass_b64, #pass_text, strlen(#pass_b64)); - read_data[strchr(#read_data, '\n')-1] = NULL; + ESBYTE[strchr(#read_data, '\n')] = NULL; strcpy(#email_text, #read_data); } pass_box.size = pass_box.pos = strlen(#pass_text); diff --git a/programs/cmm/liza/login.c b/programs/cmm/liza/login.c index 9c77f863ed..774b3e5b24 100644 --- a/programs/cmm/liza/login.c +++ b/programs/cmm/liza/login.c @@ -209,13 +209,13 @@ void DrawLoginScreen() void GetSettings() { - int at_pos = strchr(#email_text,'@'); - strlcpy(#login, #email_text, at_pos-1); - + strcpy(#login, #email_text); + ESBYTE[strchr(#login,'@')] = NULL; + if (checked[CUSTOM]) { strcpy(#POP_server_path, "pop."); - strcat(#POP_server_path, #email_text+at_pos); + strcat(#POP_server_path, strchr(#email_text,'@')+1); POP_server_port = DEFAULT_POP_PORT; } if (checked[MANUAL])