VirtualBox

Changeset 97261 in vbox


Ignore:
Timestamp:
Oct 21, 2022 6:35:54 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154247
Message:

Changed the operator[] to function at() to avoid inserting new empty element in case if the requested key is absent in the map.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r97230 r97261  
    20372037
    20382038                            ovf::VirtualDisk vd;
    2039                             vd.strIdController = vsys.mapControllers["0"].strIdController;
     2039                            //next line may generates std::out_of_range exception in case of failure
     2040                            vd.strIdController = vsys.mapControllers.at("0").strIdController;
    20402041                            vd.ulAddressOnParent = 0;
    20412042                            vd.strDiskId = d.strDiskId;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette