diff options
| author | Ludek Finstrle | 2005-12-17 21:05:44 +0000 |
|---|---|---|
| committer | Ludek Finstrle | 2005-12-17 21:05:44 +0000 |
| commit | d3acdc8818450eb6baa1bd7ba3298f7dfa08701f (patch) | |
| tree | 8b154f09d288db509c5af541d271d4d94220426b /setup.c | |
| parent | d8eb0544f8491b500228c78c18f2c89fe014c346 (diff) | |
added support for ; as delimiter for ConfigDSN
Diffstat (limited to 'setup.c')
| -rw-r--r-- | setup.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -345,7 +345,7 @@ ParseAttributes(LPCSTR lpszAttributes, LPSETUPDLG lpsetupdlg) else if (*lpsz == '=') break; /* Valid key found */ } - /* Determine the key's index in the key table (-1 if not found) */ + /* Determine the key */ cbKey = lpsz - lpszStart; if (cbKey < sizeof(aszKey)) { @@ -353,13 +353,15 @@ ParseAttributes(LPCSTR lpszAttributes, LPSETUPDLG lpsetupdlg) aszKey[cbKey] = '\0'; } - /* Locate end of key value */ + /* Locate end of key value - added support for delimiter ; */ lpszStart = ++lpsz; - for (; *lpsz; lpsz++) + for (; *lpsz && *lpsz != ';'; lpsz++) ; - /* lpsetupdlg->aAttr[iElement].fSupplied = TRUE; */ - _fmemcpy(value, lpszStart, MIN(lpsz - lpszStart + 1, MAXPGPATH)); + /* Determine the value */ + cbKey = MIN(lpsz - lpszStart, MAXPGPATH); + _fmemcpy(value, lpszStart, cbKey); + value[cbKey] = '\0'; mylog("aszKey='%s', value='%s'\n", aszKey, value); |
