correctly read version 4.2 bams

This commit is contained in:
David Rose 2003-04-16 22:21:51 +00:00
parent 350dd5cda1
commit 114020c20b
1 changed files with 7 additions and 1 deletions

View File

@ -733,10 +733,16 @@ make_Texture(const FactoryParams &params) {
string name = scan.get_string();
Filename filename = scan.get_string();
Filename alpha_filename = scan.get_string();
int primary_file_num_channels = 0;
int alpha_file_channel = 0;
if (manager->get_file_minor_ver() >= 3) {
if (manager->get_file_minor_ver() == 2) {
// We temporarily had a version that stored the number of channels
// here.
primary_file_num_channels = scan.get_uint8();
} else if (manager->get_file_minor_ver() >= 3) {
primary_file_num_channels = scan.get_uint8();
alpha_file_channel = scan.get_uint8();
}