mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 15:15:15 -04:00
make image count more robust
This commit is contained in:
parent
5b19e994b5
commit
660be58cf2
1 changed files with 10 additions and 9 deletions
|
@ -39,19 +39,20 @@ RsWireGroup::RsWireGroup()
|
|||
|
||||
uint32_t RsWirePulse::ImageCount()
|
||||
{
|
||||
if (!mImage4.empty()) {
|
||||
return 4;
|
||||
}
|
||||
if (!mImage3.empty()) {
|
||||
return 3;
|
||||
uint32_t images = 0;
|
||||
if (!mImage1.empty()) {
|
||||
images++;
|
||||
}
|
||||
if (!mImage2.empty()) {
|
||||
return 2;
|
||||
images++;
|
||||
}
|
||||
if (!mImage1.empty()) {
|
||||
return 1;
|
||||
if (!mImage3.empty()) {
|
||||
images++;
|
||||
}
|
||||
return 0;
|
||||
if (!mImage4.empty()) {
|
||||
images++;
|
||||
}
|
||||
return images;
|
||||
}
|
||||
|
||||
p3Wire::p3Wire(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs *gixs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue