mirror of
https://github.com/rockchip-linux/rkdeveloptool.git
synced 2024-11-23 10:03:53 +08:00
Merge pull request #39 from cmuellner/compilation
Fix compilation issue in split_item().
This commit is contained in:
commit
5e44dcd9e7
6
main.cpp
6
main.cpp
@ -2826,7 +2826,7 @@ void split_item(STRING_VECTOR &vecItems, char *pszItems)
|
||||
pStart = pszItems;
|
||||
pos = strchr(pStart, ',');
|
||||
while(pos != NULL) {
|
||||
memset(szItem, 0, 100);
|
||||
memset(szItem, 0, sizeof(szItem));
|
||||
strncpy(szItem, pStart, pos - pStart);
|
||||
strItem = szItem;
|
||||
vecItems.push_back(strItem);
|
||||
@ -2836,8 +2836,8 @@ void split_item(STRING_VECTOR &vecItems, char *pszItems)
|
||||
pos = strchr(pStart, ',');
|
||||
}
|
||||
if (strlen(pStart) > 0) {
|
||||
memset(szItem, 0, 100);
|
||||
strncpy(szItem, pStart, strlen(pStart));
|
||||
memset(szItem, 0, sizeof(szItem));
|
||||
strncpy(szItem, pStart, sizeof(szItem)-1);
|
||||
strItem = szItem;
|
||||
vecItems.push_back(strItem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user