Very much not good...
As the constitution is written, the nullification vote doesn't directly end martial law. It simply binds the president to withdraw martial law.
In hindsight, that might be a slight flaw, there doesn't seem to be any time limit or mechanism for what happens if the president doesn't. I'm not sure their constitution was written with an autocoup in mind.
In the end it wasn't an issue. The President did eventually withdraw martial law, I wonder what pressure was put on him to do so. And by who.
So the military should respect the constitution, but when it comes to a coup you'll get whichever general respects the constitution the least.
In the US, military officers take their oaths to obey the constitution, not the president. I don't know if that's true in South Korea.