If the preference *Ensure new line at file end* is enabled, Geany adds a newline even to a completely empty file, so it’s impossible to save a file of 0 bytes.
While strictly speaking this does just what the preference label says, in practice the point of this feature, I think, is to ensure that *every line ends* with a newline, so it shouldn’t apply when there are no lines.
That’s what the other editors (nano, vi, emacs) do — they only add a newline to a non-empty file.