Mercurial > hg > dmlib
comparison minijss/jloadxm.c @ 1160:b122ad2d3fbe
Add XM format version check.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 05 Mar 2015 07:00:58 +0200 |
parents | 29dc9337fa11 |
children | 92cee852a8af |
comparison
equal
deleted
inserted
replaced
1159:29dc9337fa11 | 1160:b122ad2d3fbe |
---|---|
809 JSSWARNING(DMERR_INVALID_DATA, DMERR_INVALID_DATA, | 809 JSSWARNING(DMERR_INVALID_DATA, DMERR_INVALID_DATA, |
810 "Number of instruments was invalid, %d (should be 1 - %d).\n", | 810 "Number of instruments was invalid, %d (should be 1 - %d).\n", |
811 xmH.ninstruments, XM_MaxInstruments); | 811 xmH.ninstruments, XM_MaxInstruments); |
812 } | 812 } |
813 | 813 |
814 switch (xmH.version) | |
815 { | |
816 case 0x0104: | |
817 break; | |
818 | |
819 default: | |
820 JSSWARNING(DMERR_NOT_SUPPORTED, DMERR_NOT_SUPPORTED, | |
821 "Unsupported version of XM format 0x%04x.\n", | |
822 xmH.version); | |
823 } | |
824 | |
814 if (!dmf_read_str(inFile, &xmH.orderList, sizeof(xmH.orderList))) | 825 if (!dmf_read_str(inFile, &xmH.orderList, sizeof(xmH.orderList))) |
815 { | 826 { |
816 JSSERROR(DMERR_FREAD, DMERR_FREAD, | 827 JSSERROR(DMERR_FREAD, DMERR_FREAD, |
817 "Error reading pattern order list.\n"); | 828 "Error reading pattern order list.\n"); |
818 } | 829 } |