Browse Source

Merge remote-tracking branch 'origin/pr/194'

* origin/pr/194:
  Fix arithmetic in init/max mem ratio correction
Marek Marczykowski-Górecki 4 years ago
parent
commit
1e3c0bfcd8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      qubesmanager/settings.py

+ 1 - 1
qubesmanager/settings.py

@@ -545,7 +545,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
                 self.tr("Initial memory can not be less than one tenth "
                         "Max memory.<br>Setting initial memory to the minimum "
                         "allowed value."))
-            self.init_mem.setValue(self.max_mem_size.value() / 10)
+            self.init_mem.setValue((self.max_mem_size.value() + 9) // 10)
 
     def check_warn_dispvmnetvm(self):
         if not hasattr(self.vm, 'default_dispvm'):