Skip to content

Commit

Permalink
Error if file not found in out folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Alyst3r committed May 29, 2024
1 parent fbdd2aa commit 584a69d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vs/ADTAreaIDFix/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"RelativeDocumentMoniker": "ADTAreaIDFix.cpp",
"ToolTip": "E:\\ADTAreaIDFix\\ADTAreaIDFix.cpp",
"RelativeToolTip": "ADTAreaIDFix.cpp",
"ViewState": "AQIAADMAAAAAAAAAAAAAAD0AAAAUAAAA",
"ViewState": "AQIAAAwAAAAAAAAAAAAAAB0AAAAMAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
"WhenOpened": "2024-05-29T10:37:39.458Z",
"EditorCaption": ""
Expand Down
6 changes: 6 additions & 0 deletions ADTAreaIDFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ int main()
fopen_s(&rootADT, rootName, "rb");
fopen_s(&outADT, outName, "r+b");

if (!outADT)
{
cout << "Cannot find specified file.\n";
return 0;
}

fseek(outADT, 0x5C, SEEK_SET); // first MCIN entry

for (j = 0; j < 256; j++)
Expand Down

0 comments on commit 584a69d

Please sign in to comment.