Ignore:
Timestamp:
Jan 9, 2017, 11:09:38 AM (2 years ago)
Author:
jrpelegrina
Message:

Update new version: 3.15.02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • filezilla/trunk/fuentes/src/putty/misc.c

    r130 r3185  
    413413
    414414    while (1) {
    415 #ifdef _WINDOWS
     415#if defined _WINDOWS && _MSC_VER < 1900 /* 1900 == VS2015 has real snprintf */
    416416#define vsnprintf _vsnprintf
    417417#endif
     
    461461    while (fgets(ret + len, size - len, fp)) {
    462462        len += strlen(ret + len);
    463         if (ret[len-1] == '\n')
     463        if (len > 0 && ret[len-1] == '\n')
    464464            break;                     /* got a newline, we're done */
    465465        size = len + 512;
     
    10681068{
    10691069    void *ret;
    1070     int len;
     1070    unsigned int len;
    10711071
    10721072    if (*datalen < 4)
     
    10911091    return TRUE;
    10921092}
     1093
     1094int strstartswith(const char *s, const char *t)
     1095{
     1096    return !memcmp(s, t, strlen(t));
     1097}
     1098
     1099int strendswith(const char *s, const char *t)
     1100{
     1101    size_t slen = strlen(s), tlen = strlen(t);
     1102    return slen >= tlen && !strcmp(s + (slen - tlen), t);
     1103}
Note: See TracChangeset for help on using the changeset viewer.