The Malaysian and Indonesian languages did not always have the same spelling that they have today. In fact until 1972, you can hardly consider the Indonesian and Malaysian languages to be similar, seeing that there is such a wide disparity in their spelling systems.
I remember the days when I had to read Indonesian novels by the likes of Hamka, Pramoedya Ananta Toer and Sutan Takdir Alisjahbana for my A level in Malay and came across what seemed to be "foreign" words like mentjari, sjarat, njamuk or djari. To the layman of course these might appear to be words from another language yet it is easy for someone who knows Malay to understand them if you remember that Indonesia was colonized by the Dutch and that their language was therefore influenced by Dutch spelling. However Indonesian spelling underwent a major revival in 1972 (known as Ejaan Yang Disempurnakan) in conjunction with efforts to create a common spelling with Malaysia. This resulted in the following changes:
tjari becomes cari (to search)
djari becomes jari (finger)
achir becomes akhir (end)
njamuk becomes nyamuk (mosquito)
sjarat becomes syarat (a condition)
sajang becomes sayang (affection)
On the Malaysian side the following changes were made:
chuchi becomes cuci (to clean)
sharikat becomes syarikat (company)
There was another big change in Malaysian spelling to align with that of Indonesian spelling and that is, the second syllable o in such words as nyamok and burong becomes u (thus nyamuk and burung) while the second syllable e in such words as puteh and itek becomes i (thus putih and itik).
Apostrophes and hyphens in Malay words were removed eg. Juma'at became Jumaat and rumah-nya became rumahnya. On the other hand the hyphen is required in the case of duplicated words. In fact what is written as rumah-rumah (= houses) today was formerly written as rumah2. The use of the numeral 2 to show the duplication of a word, a really time-saving device, was discarded with the new spelling reform.
Professor Asmah Haji Omar, Malaysia's foremost Malay language expert, who was on the spelling reform panel, detailed the changes in an article here: http://www.englishspellingsociety.org/journals/j11/malay.php