ccmake: fix curses dialog broken by refactoring
During refactoring in !2947 (merged) a transformation of a loop went wrong and editing the cmake cache with ccmake no longer works. Make ccmake work again.
Fixes: #19008 (closed)
During refactoring in !2947 (merged) a transformation of a loop went wrong and editing the cmake cache with ccmake no longer works. Make ccmake work again.
Fixes: #19008 (closed)