mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-13 22:54:47 -04:00
Version 0.11.0
- UI reworked once again - Hex pattern and text string search implemented - Code slightly refactored
This commit is contained in:
parent
7d8b5fbc20
commit
bb6f58f509
26 changed files with 4697 additions and 4327 deletions
22
ffs.cpp
22
ffs.cpp
|
@ -19,9 +19,9 @@ const UINT8 ffsAlignmentTable[] =
|
|||
UINT8 calculateChecksum8(UINT8* buffer, UINT32 bufferSize)
|
||||
{
|
||||
if(!buffer)
|
||||
return 0;
|
||||
|
||||
UINT8 counter = 0;
|
||||
return 0;
|
||||
|
||||
UINT8 counter = 0;
|
||||
|
||||
while(bufferSize--)
|
||||
counter += buffer[bufferSize];
|
||||
|
@ -32,16 +32,16 @@ UINT8 calculateChecksum8(UINT8* buffer, UINT32 bufferSize)
|
|||
UINT16 calculateChecksum16(UINT16* buffer, UINT32 bufferSize)
|
||||
{
|
||||
if(!buffer)
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
UINT16 counter = 0;
|
||||
UINT32 index = 0;
|
||||
UINT16 counter = 0;
|
||||
UINT32 index = 0;
|
||||
|
||||
bufferSize /= sizeof(UINT16);
|
||||
bufferSize /= sizeof(UINT16);
|
||||
|
||||
for (; index < bufferSize; index++) {
|
||||
counter = (UINT16) (counter + buffer[index]);
|
||||
}
|
||||
for (; index < bufferSize; index++) {
|
||||
counter = (UINT16) (counter + buffer[index]);
|
||||
}
|
||||
|
||||
return (UINT16) 0x10000 - counter;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ QString sectionTypeToQString(const UINT8 type)
|
|||
|
||||
UINT32 sizeOfSectionHeaderOfType(const UINT8 type)
|
||||
{
|
||||
switch (type)
|
||||
switch (type)
|
||||
{
|
||||
case EFI_SECTION_COMPRESSION:
|
||||
return sizeof(EFI_COMMON_SECTION_HEADER);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue