Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

Commit

Permalink
Fixed OBJ8 command error handling, turned too many args to INFO, Twin…
Browse files Browse the repository at this point in the history
  • Loading branch information
TwinFan committed Dec 13, 2018
1 parent 943817b commit 944af20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/XPMPMultiplayerCSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,13 @@ bool ParseObj8AircraftCommand(const std::vector<std::string> &tokens, CSLPackage
bool ParseObj8Command(const std::vector<std::string> &tokens, CSLPackage_t &package, const string& path, int lineNum, const string& line)
{
// OBJ8 <group> <animate YES|NO> <filename>
if (tokens.size() != 4)
if (tokens.size() < 4)
{
XPLMDump(path, lineNum, line) << XPMP_CLIENT_NAME " WARNING: OBJ8_AIRCARFT command takes 1 argument.\n";
XPLMDump(path, lineNum, line) << XPMP_CLIENT_NAME " WARNING: OBJ8 command takes 3 arguments.\n";
return false;
}
if (tokens.size() > 4)
XPLMDump(path, lineNum, line) << XPMP_CLIENT_NAME " INFO: OBJ8 command takes only 3 arguments, rest ignored.\n";

// err - obj8 record at stupid place in file
if(package.planes.empty() || package.planes.back().plane_type != plane_Obj8) return false;
Expand Down
2 changes: 2 additions & 0 deletions xplanemp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "$(INSTALL_PATH)";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = include;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
INSTALL_PATH = "@loader_path";
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(PRODUCT_MODULE_NAME)";
Expand Down Expand Up @@ -461,6 +462,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "$(INSTALL_PATH)";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = include;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
INSTALL_PATH = "@loader_path";
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(PRODUCT_MODULE_NAME)";
Expand Down

0 comments on commit 944af20

Please sign in to comment.