diff --git a/bof3_checksum b/bof3_checksum new file mode 100755 index 0000000..a74aebe Binary files /dev/null and b/bof3_checksum differ diff --git a/main.cpp b/main.cpp index 2a235e4..394ebce 100644 --- a/main.cpp +++ b/main.cpp @@ -74,8 +74,6 @@ void printBuffer() int calcChecksum() { - saveFile(filePath + ".bak"); - int sum = 0; for (int i = firstByte; i <= lastByte; i++) { @@ -92,7 +90,8 @@ int main(int argc, char *argv[]) { checkParameters(argc, argv); loadFile(filePath); - int sum = calcChecksum(); + saveFile(filePath + ".bak"); + calcChecksum(); saveFile(filePath); //cout << hex;