diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java index 5939ab5aa3..c60d237882 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java @@ -403,7 +403,8 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, C long carbTime = time + i * 15 * 60 * 1000; long smallCarbAmount = Math.round((1d * remainingCarbs) / (ticks-i)); //on last iteration (ticks-i) is 1 -> smallCarbAmount == remainingCarbs remainingCarbs -= smallCarbAmount; - createCarb(smallCarbAmount, carbTime, notes); + if (smallCarbAmount > 0) + createCarb(smallCarbAmount, carbTime, notes); } } }