c3d_import needed encoding defined for python 2.5+ to run.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 12 Oct 2008 10:39:45 +0000 (10:39 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 12 Oct 2008 10:39:45 +0000 (10:39 +0000)
wav file reading minor fix checking array bounds.

intern/SoundSystem/intern/SND_Utils.cpp
release/scripts/c3d_import.py

index 1593dd6c7948b84e9b1396dca5742708996c5f0e..78115807970c08c7c53aef3d3c36dc316bdf3a15 100644 (file)
@@ -309,7 +309,7 @@ unsigned int SND_GetNumberOfSamples(void* sample, int sample_length)
                {
                        offset += block_align;
                        
-                       if (offset+4 > sample_length) /* save us from crashing */
+                       if (offset+block_align > sample_length) /* save us from crashing */
                                return 0;
                }
                offset += 4;
@@ -347,7 +347,7 @@ unsigned int SND_GetHeaderSize(void* sample, int sample_length)
                {
                        offset += block_align;
                        
-                       if (offset+4 > sample_length) /* save us from crashing */
+                       if (offset+block_align > sample_length) /* save us from crashing */
                                return 0;
                }
                headersize = offset + 8;
index ca4f8cd79e90e12e21cf0611a03db5ae11e4696e..bfe691c394c6c5d691c9676f8590f75493037b93 100644 (file)
@@ -1,5 +1,5 @@
 #!BPY
-
+# -*- coding: latin-1 -*-
 """
 Name: 'Motion Capture  (.c3d)...'
 Blender: 246