Strip prefix "0t" from OFFSET column of OpenFilesScreen

This commit is contained in:
Peter VandeHaar 2021-09-03 00:18:30 -04:00 committed by BenBE
parent 27a18830d5
commit 5beef3e737
1 changed files with 10 additions and 2 deletions

View File

@ -155,11 +155,19 @@ static OpenFiles_ProcessData* OpenFilesScreen_getProcessData(pid_t pid) {
case 'n': /* file name, comment, Internet address */ case 'n': /* file name, comment, Internet address */
case 's': /* file's size */ case 's': /* file's size */
case 't': /* file's type */ case 't': /* file's type */
{
size_t index = getIndexForType(cmd);
free_and_xStrdup(&item->data[index], line + 1);
break;
}
case 'o': /* file's offset */ case 'o': /* file's offset */
{ {
size_t index = getIndexForType(cmd); size_t index = getIndexForType(cmd);
free(item->data[index]); if (String_startsWith(line + 1, "0t")) {
item->data[index] = xStrdup(line + 1); free_and_xStrdup(&item->data[index], line + 3);
} else {
free_and_xStrdup(&item->data[index], line + 1);
}
break; break;
} }
case 'c': /* process command name */ case 'c': /* process command name */