Skip to content

Commit

Permalink
Merge pull request #47 from oblivioncth/bugfix/add_app_no_platform
Browse files Browse the repository at this point in the history
Fix empty platform data when enqueuing add. app via CPlay
  • Loading branch information
oblivioncth authored Feb 14, 2023
2 parents 5a3d1af + 5c001b1 commit d9bc18d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/command/c-play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,11 @@ ErrorCode CPlay::enqueueAutomaticTasks(bool& wasStandalone, QUuid targetId)
return ErrorCode::SQL_ERROR;
}

// Advance result to only record
parentResult.result.next();

// Determine platform (don't bother building entire game object since only one value is needed)
QString platform = parentResult.size != 1 ? "" : parentResult.result.value(Fp::Db::Table_Game::COL_PLATFORM).toString();
QString platform = parentResult.result.value(Fp::Db::Table_Game::COL_PLATFORM).toString();

// Enqueue
enqueueError = enqueueAdditionalApp(addApp, platform, Task::Stage::Primary);
Expand Down

0 comments on commit d9bc18d

Please sign in to comment.