Skip to content

Commit

Permalink
fixed segfault with -l only
Browse files Browse the repository at this point in the history
  • Loading branch information
tihmstar committed Mar 20, 2017
1 parent bad1135 commit 7d26769
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tsschecker/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,15 @@ int main(int argc, const char * argv[]) {
}
}

for (char *c = devVals.deviceModel; *c; c++)
*c = tolower(*c); //make devicemodel lowercase
//make devicemodel look nice. This is completely optional
if (*devVals.deviceModel == 'i')
devVals.deviceModel[1] = toupper(devVals.deviceModel[1]);
else
devVals.deviceModel[0] = toupper(devVals.deviceModel[0]);

if (devVals.deviceModel){
for (char *c = devVals.deviceModel; *c; c++)
*c = tolower(*c); //make devicemodel lowercase
//make devicemodel look nice. This is completely optional
if (*devVals.deviceModel == 'i')
devVals.deviceModel[1] = toupper(devVals.deviceModel[1]);
else
devVals.deviceModel[0] = toupper(devVals.deviceModel[0]);
}

if (ecid) {
if ((devVals.ecid = parseECID(ecid)) == 0){
Expand Down

0 comments on commit 7d26769

Please sign in to comment.