| 667 | } |
| 668 | |
| 669 | void pilot::set_multiplayer_data(const char *logo, const char *audio1, const char *audio2, const uint16_t *ppic, const char *audio3, const char *audio4) { |
| 670 | if (logo) { |
| 671 | if (ship_logo) { |
| 672 | mem_free(ship_logo); |
| 673 | ship_logo = NULL; |
| 674 | } |
| 675 | ship_logo = mem_strdup(logo); |
| 676 | if (ship_logo) { |
| 677 | int len = strlen(ship_logo); |
| 678 | if (len >= PAGENAME_LEN) { |
| 679 | ship_logo[PAGENAME_LEN - 1] = '\0'; |
| 680 | } |
| 681 | } |
| 682 | write_pending = true; |
| 683 | } |
| 684 | //////////// |
| 685 | if (audio1) { |
| 686 | if (audio1_file) { |
| 687 | mem_free(audio1_file); |
| 688 | audio1_file = NULL; |
| 689 | } |
| 690 | audio1_file = mem_strdup(audio1); |
| 691 | if (audio1_file) { |
| 692 | int len = strlen(audio1_file); |
| 693 | if (len >= PAGENAME_LEN) { |
| 694 | audio1_file[PAGENAME_LEN - 1] = '\0'; |
| 695 | } |
| 696 | } |
| 697 | write_pending = true; |
| 698 | } |
| 699 | //////////// |
| 700 | if (audio2) { |
| 701 | if (audio2_file) { |
| 702 | mem_free(audio2_file); |
| 703 | audio2_file = NULL; |
| 704 | } |
| 705 | audio2_file = mem_strdup(audio2); |
| 706 | if (audio2_file) { |
| 707 | int len = strlen(audio2_file); |
| 708 | if (len >= PAGENAME_LEN) { |
| 709 | audio2_file[PAGENAME_LEN - 1] = '\0'; |
| 710 | } |
| 711 | } |
| 712 | write_pending = true; |
| 713 | } |
| 714 | //////////// |
| 715 | if (ppic) { |
| 716 | picture_id = *ppic; |
| 717 | write_pending = true; |
| 718 | } |
| 719 | //////////// |
| 720 | if (audio3) { |
| 721 | if (audio3_file) { |
| 722 | mem_free(audio3_file); |
| 723 | audio3_file = NULL; |
| 724 | } |
| 725 | audio3_file = mem_strdup(audio3); |
| 726 | if (audio3_file) { |
no outgoing calls
no test coverage detected