Differences between random-potential and random-magnetic-field localization in quasi-one-dimensional systems