Code Monkey home page Code Monkey logo

catacombsdl's People

Contributors

blzut3 avatar rdmandel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

catacombsdl's Issues

Segmentation Fault

So I compiled the release with the following commands:
cmake /catacombsSDL
make

Copied the game data to the directory and I get the following error.

[1]    5563 segmentation fault  ./catacomb

What information do I need to get you to help with this error?

Levels decompression has two bugs

The level decompression has two bugs:

  1. the RLE expand routine should halt the cycle when the threshold is reached on the input bytes, not output bytes; beside checking on the size of the output buffer will cause bogus data to be written (since reads will be performed over the intended limit), the last cycle may also write over the buffer
  2. there seems to be a bug in the original project - some levels expand to more than the allocated 4096 bytes; one of the levels expand to 4338 bytes.

Overflow in `_SDL_turnOnPCSpeaker`

The _SDL_turnOnPCSpeaker function performs this operation:

	pcPhaseLength = (pcSample*AudioSpec.freq)/(2*PC_BASE_TIMER);

now, pcSample is a 16 bit unsigned, and AudioSpec.freq a 32 bit signed; their product yields a 32 bit signed.

Since pcSample does reach a value of 65535, and AudioSpec.freq can be 48000, the result will overflow the 32 bit signed capacity.

I guess that one of the two should be casted to a 32 bit unsigned, which, conveniently, is also the pcPhaseLength size.

Snippet here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.