diff --git a/ChangeLog b/ChangeLog index f9f1134c3..13ffc32ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ 2008-09-16 Tobias Doerffel + * src/core/project_journal.cpp: + improved usage of random number generator (closes #2109211) + + * plugins/ladspa_effect/tap/tap_pinknoise.c: + * plugins/ladspa_effect/caps/interface.cc: + * src/core/drumsynth.cpp: + * src/core/main.cpp: + don't mis-initialize random number generator with default value + + * src/core/journalling_object.cpp: + print name of object which uses ID if another object requests it + + * src/core/automation_pattern.cpp: + make sure we don't return NULL in automationPattern::firstObject() + * plugins/ladspa_effect/ladspa_effect.cpp: * include/engine.h: * include/effect_rack_view.h: diff --git a/src/core/project_journal.cpp b/src/core/project_journal.cpp index 3d4a9ce9b..0bf0a6c0f 100644 --- a/src/core/project_journal.cpp +++ b/src/core/project_journal.cpp @@ -105,9 +105,10 @@ void projectJournal::journalEntryAdded( const jo_id_t _id ) jo_id_t projectJournal::allocID( journallingObject * _obj ) { - const jo_id_t EO_ID_MAX = 1 << 24; + const jo_id_t EO_ID_MAX = (1 << 23)-1; jo_id_t id; - while( m_joIDs.contains( id = static_cast( rand() % + while( m_joIDs.contains( id = + static_cast( (jo_id_t)rand()*(jo_id_t)rand() % EO_ID_MAX ) ) ) { }