Ignore:
Timestamp:
Sep 5, 2008, 5:27:06 AM (17 years ago)
Author:
bird
Message:

kmk/expreval/ifcond: fixed the target operator and string parsing; wrote the remaining tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/expreval.c

    r1726 r1728  
    903903            pFile = NULL;
    904904    }
    905     if (pFile)
     905    if (!pFile)
    906906#endif
    907907    {
     
    18281828         * push it onto the stack.
    18291829         */
    1830         const char *pszStart = psz;
     1830        const char *pszStart;
    18311831
    18321832        rc = kExprRet_Ok;
    18331833        if (*psz == '"')
    18341834        {
    1835             pszStart++;
     1835            pszStart = ++psz;
    18361836            while (*psz && *psz != '"')
    18371837                psz++;
    18381838            expr_var_init_substring(&pThis->aVars[++pThis->iVar], pszStart, psz - pszStart, kExprVar_QuotedString);
     1839            if (*psz)
     1840                psz++;
    18391841        }
    18401842        else if (*psz == '\'')
    18411843        {
    1842             pszStart++;
     1844            pszStart = ++psz;
    18431845            while (*psz && *psz != '\'')
    18441846                psz++;
    18451847            expr_var_init_substring(&pThis->aVars[++pThis->iVar], pszStart, psz - pszStart, kExprVar_QuotedSimpleString);
     1848            if (*psz)
     1849                psz++;
    18461850        }
    18471851        else
     
    18521856            char    ch;
    18531857
     1858            pszStart = psz;
    18541859            while ((ch = *psz) != '\0')
    18551860            {
Note: See TracChangeset for help on using the changeset viewer.