I modified my diff, so it also checks flag (which should hold information about which button was pressed), now it should only trigger if one hit OK.
now its okay, but still the message from unidentified items :/ since the shop window still open, maybe that has something to do with vending.c?