From 46738e9c0e4c7e6a54d10c48b08934cee46281fc Mon Sep 17 00:00:00 2001 From: Jasem Mutlaq Date: Sun, 26 May 2024 13:30:53 +0300 Subject: [PATCH] Fix calloc argument order --- indi-gphoto/gphoto_ccd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indi-gphoto/gphoto_ccd.cpp b/indi-gphoto/gphoto_ccd.cpp index 2211e7006..2ff3c7279 100644 --- a/indi-gphoto/gphoto_ccd.cpp +++ b/indi-gphoto/gphoto_ccd.cpp @@ -1505,7 +1505,7 @@ bool GPhotoCCD::grabImage() ISwitch * GPhotoCCD::create_switch(const char * basestr, char ** options, int max_opts, int setidx) { int i; - ISwitch * sw = static_cast(calloc(sizeof(ISwitch), max_opts)); + ISwitch * sw = static_cast(calloc(max_opts, sizeof(ISwitch))); ISwitch * one_sw = sw; char sw_name[MAXINDINAME];