mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 08:29:32 -05:00
make image count more robust
This commit is contained in:
parent
5b19e994b5
commit
660be58cf2
@ -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…
Reference in New Issue
Block a user