[PR #1243] [MERGED] Fix: Segmentation fault in merge_sort.c and print message #1833

Closed
opened 2026-01-29 15:25:07 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1243
Author: @PKGzGMTH
Created: 3/31/2023
Status: Merged
Merged: 4/9/2023
Merged by: @Panquesito7

Base: masterHead: master


📝 Commits (8)

  • 602b11d fix segmentation fault
  • ba565d6 add a comments
  • 987c986 add print error message when can't malloc and exit program
  • bde81dd Merge branch 'master' into master
  • f0c9173 Update sorting/merge_sort.c
  • aefaf26 Update sorting/merge_sort.c
  • 73b4309 Merge branch 'TheAlgorithms:master' into master
  • f3e6491 Merge branch 'master' into master

📊 Changes

1 file changed (+20 additions, -1 deletions)

View changed files

📝 sorting/merge_sort.c (+20 -1)

📄 Description

Description of Change

  • Fix: Segmentation fault in merge_sort.c
  • Feat: Print message of input and output.

Checklist

  • Added description of change
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

  • Handle error if array can't malloc.
  • Exit program if array size is not greater than 0.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/1243 **Author:** [@PKGzGMTH](https://github.com/PKGzGMTH) **Created:** 3/31/2023 **Status:** ✅ Merged **Merged:** 4/9/2023 **Merged by:** [@Panquesito7](https://github.com/Panquesito7) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (8) - [`602b11d`](https://github.com/TheAlgorithms/C/commit/602b11d46a90861f4592786ffe7e16a04d204eac) fix segmentation fault - [`ba565d6`](https://github.com/TheAlgorithms/C/commit/ba565d68ba62a933fda78279d6d31ca37a7ae24c) add a comments - [`987c986`](https://github.com/TheAlgorithms/C/commit/987c986242c1c0a6a37f839a9e26e08739ddd38d) add print error message when can't malloc and exit program - [`bde81dd`](https://github.com/TheAlgorithms/C/commit/bde81ddb445b9e83e9c156f2ba506deb62ade82b) Merge branch 'master' into master - [`f0c9173`](https://github.com/TheAlgorithms/C/commit/f0c91730f73961eefe8741f269fca5b94f7623eb) Update sorting/merge_sort.c - [`aefaf26`](https://github.com/TheAlgorithms/C/commit/aefaf26a3ebfff3b92cc76100d0a75a0004b36d3) Update sorting/merge_sort.c - [`73b4309`](https://github.com/TheAlgorithms/C/commit/73b4309506c9a0ff0d2a55d1341e292a882348af) Merge branch 'TheAlgorithms:master' into master - [`f3e6491`](https://github.com/TheAlgorithms/C/commit/f3e64916da8c6f6b955d0cc044544f140b9a8040) Merge branch 'master' into master ### 📊 Changes **1 file changed** (+20 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `sorting/merge_sort.c` (+20 -1) </details> ### 📄 Description #### Description of Change * Fix: Segmentation fault in merge_sort.c * Feat: Print message of input and output. #### Checklist - [x] Added description of change - [x] Search previous suggestions before making a new one, as yours may be a duplicate. - [x] I acknowledge that all my contributions will be made under the project's license. Notes: * Handle error if array can't malloc. * Exit program if array size is not greater than 0. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:25:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#1833