I think you meant buffer[0] == '1'