From a04fdcedd43ad60d2f2d99f1aba1282c6ce2bb68 Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Fri, 26 Jan 2024 11:19:46 +0100
Subject: [PATCH] Write number of spheres to TPPOAN output

---
 src/sphere/sphere.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sphere/sphere.cpp b/src/sphere/sphere.cpp
index 8c6ac483..f7135caa 100644
--- a/src/sphere/sphere.cpp
+++ b/src/sphere/sphere.cpp
@@ -223,6 +223,7 @@ void sphere(string config_file, string data_file, string output_path) {
       tppoan.write(reinterpret_cast<char *>(&nph), sizeof(int));
       tppoan.write(reinterpret_cast<char *>(&nths), sizeof(int));
       tppoan.write(reinterpret_cast<char *>(&nphs), sizeof(int));
+      tppoan.write(reinterpret_cast<char *>(&nsph), sizeof(int));
 
       for (int nsi = 0; nsi < nsph; nsi++)
 	tppoan.write(reinterpret_cast<char *>(&(sconf->iog_vec[nsi])), sizeof(int));
-- 
GitLab