File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ ALLEGRO_SAMPLE *_al_load_voc_f(ALLEGRO_FILE *file)
277
277
/*
278
278
* Let's allocate at least the first block's bytes;
279
279
*/
280
- buffer_size = vocdata -> samples * vocdata -> sample_size ;
280
+ buffer_size = ( size_t ) vocdata -> samples * vocdata -> sample_size ;
281
281
buffer = al_malloc (buffer_size );
282
282
if (!buffer ) {
283
283
return NULL ;
@@ -304,7 +304,7 @@ ALLEGRO_SAMPLE *_al_load_voc_f(ALLEGRO_FILE *file)
304
304
bytestoread = 0 ;
305
305
READNBYTES (vocdata -> file , bytestoread , 2 , NULL );
306
306
READNBYTES (vocdata -> file , x , 1 , NULL );
307
- bytestoread += x << 16 ;
307
+ bytestoread += ( size_t ) x << 16 ;
308
308
/* increase subsequently storage */
309
309
buffer_size += bytestoread ;
310
310
buffer = al_realloc (buffer , buffer_size );
Original file line number Diff line number Diff line change @@ -313,12 +313,12 @@ ALLEGRO_INDEX_BUFFER* al_create_index_buffer(int index_size,
313
313
*/
314
314
void al_destroy_vertex_buffer (ALLEGRO_VERTEX_BUFFER * buffer )
315
315
{
316
- int flags = al_get_display_flags (al_get_current_display ());
317
- ASSERT (addon_initialized );
318
-
319
316
if (buffer == 0 )
320
317
return ;
321
318
319
+ int flags = al_get_display_flags (al_get_current_display ());
320
+ ASSERT (addon_initialized );
321
+
322
322
al_unlock_vertex_buffer (buffer );
323
323
324
324
if (flags & ALLEGRO_OPENGL ) {
@@ -335,12 +335,12 @@ void al_destroy_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer)
335
335
*/
336
336
void al_destroy_index_buffer (ALLEGRO_INDEX_BUFFER * buffer )
337
337
{
338
- int flags = al_get_display_flags (al_get_current_display ());
339
- ASSERT (addon_initialized );
340
-
341
338
if (buffer == 0 )
342
339
return ;
343
340
341
+ int flags = al_get_display_flags (al_get_current_display ());
342
+ ASSERT (addon_initialized );
343
+
344
344
al_unlock_index_buffer (buffer );
345
345
346
346
if (flags & ALLEGRO_OPENGL ) {
You can’t perform that action at this time.
0 commit comments