Skip to content

Commit

Permalink
Fixing warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
PerryWerneck committed Nov 11, 2024
1 parent 80b57c2 commit 2f24972
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dmiget/dmiget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@
line[60] = line[77] = '|';
}

char buffer[10];
char buffer[20];

const uint8_t *ptr = smbios->get(offset);
snprintf(buffer,9,"%02x",*ptr);
snprintf(buffer,19,"%02x",*ptr);
memcpy(line+(10+(col*3)),buffer,2);

snprintf(buffer,9,"%08lx",(unsigned long) offset);
snprintf(buffer,19,"%08lx",(unsigned long) offset);
memcpy(line,buffer,8);

line[61+col] = (*ptr >= ' ' && *ptr < 128) ? *ptr : '.';
Expand Down

0 comments on commit 2f24972

Please sign in to comment.